home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / tcl / 2214 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.7 KB

  1. Path: sparky!uunet!noc.near.net!news.bbn.com!bbn.com!jpalmucc
  2. From: jpalmucc@bbn.com (Jeff Palmucci)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: Advice wanted on math functions for Tcl 7.0
  5. Date: 22 Dec 1992 17:29:14 GMT
  6. Lines: 33
  7. Distribution: world
  8. Message-ID: <ljek3aINN7pu@news.bbn.com>
  9. References: <1h5pseINNkvu@agate.berkeley.edu> <1h5uc2INNljk@agate.berkeley.edu>
  10. NNTP-Posting-Host: bbn.com
  11.  
  12. joel@saffron.CS.Berkeley.EDU (Joel A. Fine) writes:
  13.  
  14. >In article <1h5pseINNkvu@agate.berkeley.edu>, ouster@sprite.Berkeley.EDU (John Ousterhout) writes:
  15. >|> There are two possible ways to implement math functions: embedded into
  16. >|> expr or as separate commands.
  17.  
  18. >If they are embedded into expr, it is trivial to generate the separate commands later:
  19.  
  20. >proc sin {n} {
  21. >  return [expr {sin($n)}]
  22. >}
  23.  
  24. >I don't see a simple way to emulate the expr-embedding approach using function
  25. >definitions. If other considerations leave it a toss-up, I'd go with embedding it
  26. >into expr for this reason.
  27.  
  28. How much will expr-embedding math functions effect the size of the TCL
  29. core library? I think it would be bad to link in libm, even if the
  30. application never uses sin or cos. 
  31.  
  32. The most important feature of TCL to me is its size (no one should be
  33. using TCL for its speed). In the PC world, TCL is already pretty big.
  34. Please don't make it any bigger. If performance were an issue, I'd
  35. rethink my app/TCL boundary, and move more code into the C-side.
  36.  
  37. Someone will probably flame me, but I don't see any great use for
  38. these functions in application script writing or GUI layout. (circular
  39. windows?) Even though I have lots of stuff loaded into my emacs, no
  40. one bothers to define sin or cos.
  41.  
  42.  
  43. Jeff Palmucci
  44. jpalmucc@bbn.com
  45.