Re: Mathematica writing style
- To: mathgroup at smc.vnet.net
- Subject: [mg18944] Re: Mathematica writing style
- From: tburton at brahea.com (Tom Burton)
- Date: Fri, 30 Jul 1999 01:33:39 -0400
- Organization: Brahea, Inc.
- References: <7ni8bb$5u7@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 26 Jul 1999 14:10:51 -0400, in comp.soft-sys.math.mathematica you wrote: >It seems that Mathematica is great for writing small programs, >but things get difficult with larger programs because of lack of >modularity... Hello, I second the comment that large modules are clumsy (and often slower to execute) in Mathematica; try to break them up. When I first began to write relatively large applications in Mathematica, I got in trouble with programming errors that prevented the evaluation of one or more expressions. Such an error can grow quickly into a huge symbolic expression if not stopped. I learned to put "firebreaks" in strategic places in the form of argument lists that accept only numbers: _Integer, _Real, _Complex, _?NumberQ, ?NumbericQ, etc. I've written and used extensively a small set of monitoring routines that (1) maintain the current call stack (so you know what function was executing before an Abort), and (2) keep statitics of number of calls and total Timing. If it might help, I would be glad to send them to you. Tom Burton