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