home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / tcl / 2223 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.4 KB  |  60 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!think.com!ames!pacbell.com!att-out!cbfsb!cbnews!cbnewsm!gah
  3. From: gah@att.com (George A. Howlett)
  4. Subject: Re: Advice wanted on math functions for Tcl 7.0
  5. Reply-To: george.howlett@att.com
  6. Organization: AT&T Bell Laboratories
  7. Date: Tue, 22 Dec 1992 20:12:13 GMT
  8. Message-ID: <1992Dec22.201213.26543@cbnewsm.cb.att.com>
  9. X-Newsreader: TIN [version 1.1 PL8]
  10. References: <ljek3aINN7pu@news.bbn.com>
  11. Sender: news@cbnewsm.cb.att.com (NetNews Administrator)
  12. Nntp-Posting-Host: grenache.cnet.att.com
  13. Lines: 45
  14.  
  15. Jeff Palmucci (jpalmucc@bbn.com) wrote:
  16.  
  17. : The most important feature of TCL to me is its size (no one should be
  18. : using TCL for its speed). In the PC world, TCL is already pretty big.
  19. : Please don't make it any bigger. If performance were an issue, I'd
  20. : rethink my app/TCL boundary, and move more code into the C-side.
  21.  
  22. This will depend on the size of your math library routines and if you
  23. have floating point hardware, etc.  You need to add very little C code
  24. to link in the math functions.  Do you see a bloat when you link in
  25. math functions routines into a normal C program?  Of course for those 
  26. with shared libraries, this is not a problem.
  27.  
  28. : Someone will probably flame me, but I don't see any great use for
  29. : these functions in application script writing or GUI layout. (circular
  30. : windows?) Even though I have lots of stuff loaded into my emacs, no
  31. : one bothers to define sin or cos.
  32.  
  33. Clearly, numerically oriented applications will benefit greatly.  But 
  34. I also found it invaluable when using the canvas widget (simple trigonometry
  35. like calculating the distance between two points, rotations, etc).  
  36.  
  37. Brad Morrison (brad@NeoSoft.com) wrote:
  38.  
  39. : But (+, *, etc.) are operators, not functions.  I am for defining the
  40. : math functions as intrinsic Tcl functions.  I will admit, the efficiency
  41. : *is* tempting, but what about other math functions?  Should expr just
  42. : keep growing to accomodate them, too?  This sort of approach, with an emphasis
  43. : toward efficiency, with syntax changes and inconsistencies considered as
  44. : secondary, reminds me a bit too much of Perl.
  45.  
  46. The set of intrinsic math functions needed is fairly well defined.  The
  47. difference in actual code for either implementation is probably neglible.
  48.  
  49. I don't understand where it is syntactically inconsistent.  But it won't
  50. break extended Tcl code.  People here have been using it for the last
  51. year or better with no problems.
  52.  
  53. --gah
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.