3 ms·
> It is a horrible language, I think some called it a write-only language. TBH, I don't think that the language is badly designed for a CAS. Most CAS (e.g., M
by b215826 5y ago
> It is a horrible language, I think some called it a write-only language.
TBH, I don't think that the language is badly designed for a CAS. Most CAS (e.g., Maxima, Maple, etc.) all use a language that's heavily influenced by functional programming languages. But yeah, Mathematica is terrible for numerical work, and doesn't play well with other external libraries or tools.
- KolenCh 5y agoI was referring to https://en.wikipedia.org/wiki/Write-only_language https://en.wikipedia.org/wiki/Write-only_language and seems like Mathematica is the only CAS on the list. Actually as a functional language it is not bad. It is not the programming paradigm that it is at fault. I remember someone praised Mathematica as the best language out there because of its functional paradigm. I’m not sure if anyone has called it a read only language too. But in some sense it is. You can look at a notebook and have no way you can write a code like that without working it through interactively. I once got one that basically there’re multi solutions and the next step chose one of the solution, where somehow which solution you pick is deterministic but you wouldn’t know without running it interactively. (There are perhaps better way to do it programmatically but the “best” practice wasn’t well known or encouraged.) Another way to think about it is, it is not a language that one can just write a program on its own. It almost must be developed interactively. And because of that nature, it is easy to lose track when it is getting long. Some of this are more general problem, like Jupyter which starts as something imitating the Mathematica notebook experience. But in those cases, it is much more easy to refactor things in a module and reuse them. (Where lack of namespace separation in Mathematica is a big contributing factor.) I’ve developed a tiny Mathematica package for personal use, so I’m not an experienced Mathematica-ian, but I think what I said is well known problems of it.
- b215826 5y ago> I was referring to https://en.wikipedia.org/wiki/Write-only_language https://en.wikipedia.org/wiki/Write-only_language and seems like Mathematica is the only CAS on the list. Interesting, and thanks for the link. I didn't know such a term existed, although I'm a bit disappointed to see C and Lisp in the list, which some consider to be extremely well-designed languages. > Another way to think about it is, it is not a language that one can just write a program on its own. It almost must be developed interactively. And because of that nature, it is easy to lose track when it is getting long. I agree. Although Wolfram Inc. has been pushing WolframScript and Wolfram Engine (and the IntelliJ IDEA plugin), at the end of the day the Wolfram language is best suited for interactive development, i.e., through the Notebook interface. And Mathematica Notebooks do not play well with most version control systems and are best treated as binary files.
- KolenCh 5y agoI agree C kind of stand out from that list (I don't know lisp). But I think as C is a small language, some people can write pretty simple to read C. But I guess the term is used to describe C as well because of how "close to metal" it is, and people can do some insane things to optimize their code, in a way that becomes "write-only". One example might be Linux kernel code? Another example from what I heard directly: A few years ago, from one of the project nominated for the Gordon Bell prize, one of the Scientist showed us their code. For perspective, this was to be run on Intel KNL so it is extra hard for the compiler to optimize it well. Since our machine is from Intel (and the contract stated they will provide support), Intel engineers were involved in optimizing a kernel. In the end they generated hundreds of lines of C code and committed to the code base directly. It was partly because it is time-sensitive so they can't wait until they modify the Intel compiler to optimize that code, so they sort of optimize it manually. Now if you read that source code, there's no way you can modify it, rightly fit into the description of "write-only" language. Also, there's a less well known term of read-only language. I can't find a wiki page for that. But I think AppleScript is on the list, because you know, reading an AppleScript makes it looks quite straight forward it should be written this way, but if you're asked to reproduce it or write something similar, you can't. Hence read-only. Edit: It was described in earlier history of the same wikipedia page but was removed: https://en.wikipedia.org/w/index.php?title=Write-only_language&oldid=878704915 https://en.wikipedia.org/w/index.php?title=Write-only_langua...