home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!wupost!darwin.sura.net!spool.mu.edu!agate!peoplesparc.Berkeley.EDU!fateman
- From: fateman@peoplesparc.Berkeley.EDU (Richard Fateman)
- Newsgroups: sci.math.symbolic
- Subject: Re: The Real Meaning of Efficiency? (Re: Serious Programming, etc.)
- Date: 19 Nov 1992 17:43:49 GMT
- Organization: University of California, Berkeley
- Lines: 44
- Distribution: world
- Message-ID: <1egjolINNk2e@agate.berkeley.edu>
- References: <18NOV199217533011@reg.triumf.ca>
- NNTP-Posting-Host: peoplesparc.berkeley.edu
-
- In my view one of the most powerful abstractions for programming
- mathematical algorithms is recursion. If a user writes a recursive
- program in Mathematica, it appears that there is an enormous
- efficiency penalty, at least compared to using built-in Map-like
- commands. This is quite unfortunate. It leads to intellectual
- inefficiency. If recursion and pattern matching were so good, perhaps
- we wouldn't see so much claptrap in "fast Mathematica" programs
- with # and &, which (I suspect) are merely ways to AVOID pattern matching
- and the usual function call overhead.
-
- digression ...
- When IBM came out with the IBM-360 design in the mid 1960s, they
- missed the boat on recursion and subroutine calling generally.
- The architects seemed to not know about stacks:
- They left out instructions to increment a stack pointer, and indeed
- even screwed up by not having more than 16 bit relative addresses
- (limiting the size of a stack). A subroutine call in PL/I was initially
- INCREDIBLY expensive (for C fans, consider calling malloc at every
- subroutine call for space to save registers).
-
- Some people think the IBM 360 set back the progress of programming
- languages by 10 years or more.
-
- end of digression...
-
- Tools -->and their efficiency <-- affect the way you think.
-
- Mathematica is, in my view, poor in this regard. It encourages you
- to think inefficiently because, in spite of providing so many tools,
- it does not promote the right ones, or provide efficient versions of
- them. (Recursion being one; information hiding a second prominent one.)
-
- Stephen Wolfram's ambition (according to an interview in an article in
- The Chronicle of Higher Education some months ago) appears to be
- to have the Mathematica language replace all others as a first
- programming language (i.e. instead of Pascal, Modula II, Scheme,
- Ada, ... etc). I am not enthusiastic about this prospect.
-
- RJF
-
-
- --
- Richard J. Fateman
- fateman@cs.berkeley.edu 510 642-1879
-