Hacker News new | ask | show | jobs
by Adrock 5041 days ago
The syntax is heavily influenced by M-expressions, which were used for the original version of Lisp in McCarthy's papers [1]. I believe the purity and power of the syntax is a major factor in the stability of the language.

I spent the summer of 2000 interning at Wolfram. I wrote coverage tests for over 60,000 lines of the Mathematica source code in areas ranging from functional programming operations to advanced numerical functions. My experience was that the source code was incredibly clean and well organized across the board.

[1] http://en.wikipedia.org/wiki/M-expression#Variants

1 comments

I didn't understand as much as I'd have liked of the linked article. Let me check something. In Mathematica, are the M expressions the internal 'FullForm' representations of expressions? So, for example, I type:

    a = {1,2,3};
Which is represented internally as an 'M expression' of List[1,2,3] (obtainable through FullForm[a], or its head through Head[a])?

Is that it?

I didn't realise that was a named concept. It does make sense to have a completely unified internal representation underneath the syntactic sugar, since you'd need everything to be in that form for the term rewriting system to work.

Thanks!

Yes, and for completeness I'd like to point out that this doesn't just apply to the right-hand side of the equation you gave. The "=" is just syntactic sugar to let you do variable assignment using infix notation:

In[1]:= FullForm[Hold[a={1,2,3}]]

Out[1]//FullForm= Hold[Set[a,List[1,2,3]]]

Worth pointing out, thanks! I see how that works.