| ▲ | fsh 7 hours ago | ||||||||||||||||||||||
I quite like Sage. Python is a much better language than Wolfram (yes, he named it after himself...). In Wolfram, there is no real scoping (even different notebooks share all variables, Module[] is incredibly clumsy), no real control flow (If[] is just a function), and no real error handling. When Wolfram encounters an exception, it just prints a red message and keeps chugging along with the output of the error'd function being replaced by a symbolic expression. This usually leads to pages and pages of gibberish and/or crashes the kernel (which for some reason is quite difficult to interrupt or restart). Together with the notebook format and the laughable debugger, this makes finding errors extremely frustrating. The notebooks are also difficult to version control (unreadable diffs for minor changes), and unit testing is clearly just an afterthought. Also the GUI performance is bad. Put more than a hand full of plots on a page, and everything slows to a crawl. What keeps me coming back is the comprehensive function library, and the formula inputs. I find it quite difficult to spot mistakes in mathematical expressions written in Python syntax. | |||||||||||||||||||||||
| ▲ | gucci-on-fleek 5 hours ago | parent | next [-] | ||||||||||||||||||||||
> Python is a much better language than Wolfram Different languages are better at different things, so it rarely makes much sense to say that one language is better than another in general. Python is definitely much better than Mathematica for "typical" imperative programming tasks (web servers, CLI programs, CRUD apps, etc.), but Mathematica is much better at data processing, symbolic manipulation, drawing plots, and other similar tasks. > there is no real scoping (even different notebooks share all variables, Module[] is incredibly clumsy) Scoping is indeed an absolute mess, and the thing that I personally find the most irritating about the language. > no real control flow (If[] is just a function) You're meant to program Mathematica by using patterns and operating on lists as a whole, so you should rarely need to use branching/control flow/If[]. It's a very different style of programming that takes quite a while to get used to, but it works really well for some tasks. > no real error handling For input validation, you should use the pattern features to make it impossible to even call the function with invalid input. And for errors in computation, it often makes the most sense to return "Undefined", "Null", "Infinity", or something similar, and then propagate that through the rest of the expression. > The notebooks are also difficult to version control (unreadable diffs for minor changes) Mathematica notebooks tend to do slightly better with version control than Jupyter Notebooks, although they're both terrible. You can work around this with Git clean/smudge filters, or you can just use ".wls"/".py" files directly. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | disentanglement 6 hours ago | parent | prev [-] | ||||||||||||||||||||||
Fully agreed. I have never seen a programming language which is so badly designed as Wolfram. I really wish there was another way to access all of Mathematica's functionality with a more sane interface. | |||||||||||||||||||||||