MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Language vs. Library

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61181] Re: [mg61144] Re: Language vs. Library
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 12 Oct 2005 01:42:06 -0400 (EDT)
  • References: <did316$qfd$1@smc.vnet.net> <200510110721.DAA15085@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 11 Oct 2005, at 16:21, Steven T. Hatton wrote:

> I've described Mathematica as Lisp on steroids, and I believe that is
> probably a very apropos depiction.  An expression is a list (in the  
> Lisp
> sense) where a Lisp car is analogous to a Mathematica Head.

I do not think this is a correct or helpful this description of  
Mathematica.  In fact, I think people who take this similarity too  
far end up writing even more inefficient programs than people who  
keep using For loops. The biggest difference is, of course,  the way  
recursion is handled and it is recursive programming that is the  
essence of Lisp. It is certainly not essential in Mathematica; I  
don't think even one in five Mathematica programs I write use recursion.

>
> I'm not sure if structural entities such as Module and Block  
> qualify as
> foundational in Mathematica, or are derived from more fundamental
> components.  Likewise for many of the procedural entities such as  
> For If
> Goto, etc. qualify as elementary.

A lot of Mathematica is written in Mathemtica and the rest is written  
in C. One could argue that the latter but not the former part   
belongs "the core", but as this distinction is largely invisible to  
the user  so in practice it does not matter.

Anyway,  languages like C seems to me a fundamentally different from  
Mathematica. C has essentially no "built-in functions" but it has a  
very clearly defiend sytax. In fact I wuld say that in the case of  
languages like C, language is syntax. On the other hand in  
Mathematica there are lots of built-in fucntions. There is a basic  
syntax for making valid expressions and there is also syntax  
associated with each built in function (it is not at all clear to me  
if you would want ot consider Solve, NSolve, Integrate, GroebnerBasis  
etc, as belonging to "the language", core or otherwise, but they  
certainly have a syntax). Another crucial thing is the evaluation  
sequence, understanding of which is as important as that of correct  
syntax.  Mathematica's syntax is is a very different thing form  C's  
syntax: it  allows a far greater variety of possibly legal  
expressions, it is constantly being expanded by the addition of new  
functions, new options, etc (and can even be modified by the user)  
and it  is not fully documented and probably never will be. All this  
makes me feel that all comparisons with languages like C or even Lisp  
are not very useful and neither would be a concept of "core  
language", even in the unlikely event of WRI deciding to open the  
source code of Mathematica so that we could see which functions are  
written in terms of which.

Andrzej Kozlowski
Tokyo, Japan




  • Prev by Date: Re: Using MathLink to create a GUI
  • Next by Date: Re: Re: Skipping Elements in Sum
  • Previous by thread: Re: Language vs. Library
  • Next by thread: Re: Re: Language vs. Library