|
|
|
|
|
by bryango
893 days ago
|
|
Wolfram would like to say that he invented Mathematica all by himself, but in its core, it is basically a lisp: everything is an expression, and mathematics are just transformations of the expressions. Afaik this makes it the best tool (conceptually and practically) for generic symbolic manipulations. For example, `1 + 1` in Mathematica is just syntactic sugar for `Plus[1, 1]`, and `a = 1` is `Set[a, 1]`. I am a PhD student in theoretical physics and almost everyone in our field has no choice but to use it (I do know one or two people that use maple, but the overwhelming majority chooses mathematica). Despite its elegant design, many people hate it with a passion, as it has grown to be a huge bloated mess that takes forever to run. Also, due to the closed source nature, it is very hard to debug when something goes wrong. For example, it is quite often for the basic functions like `Simplify` and `Integrate` to get stuck running forever, but there is no way to keep track of the internal transformations that mathematica is doing, since everything is sealed up. |
|
Based on my understanding of how expression evaluation works, the slightly more revealing statements would be "it is a lot of lisp macros" and "everything is an s-expression". Which means, a big mess. Let me expand:
As a functional programmer, "everything is an expression" sounds comforting, and I would expect there are clear transformation rules on how expressions are evaluated (and, maaybe, type signatures).
Instead, what you get is, "you can throw in some random form of expressions into this function, and it will do something with them". As in, it takes an AST input, and transforms them in some loosely specified way. There doesn't seem to be a type system, so you don't have types to guide you, rather you likely need to figure what kind of expressions work with which functions.
Now, if I'm wrong about this, and the functions behave consistently in what they take and how they transform it, then I'm more than open to be corrected. It is just that my high expectations (based on marketing of the lang) and the subsequent realization left me a bit bitter.