notes-computer-programming-programmingLanguageDesign-prosAndCons-octave

lloda 2 days ago

link

Sometimes an array of numbers is just an array of numbers. The language shouldn't presume too much about what you mean to do with them.

The moment you need an extra dimension (or anything other than 2 really) Matlab's ‘everything is a matrix’ approach falls apart. Matlab is a toy language in so many ways and this is just another one.

It's a pity that Julia adopted Matlab's pop matrix semantics instead of some solid and general principles from APL or J. Even modern Fortran would have been a better model for an array DSL. From what I've read of the Julia docs, they actually want you to write loops. But Julia looks great otherwise. With macros and a good compiler, maybe the array features can be fixed at some point.

reply

shele 2 days ago

link

Yes, adverbs, ranked matrix operator and some other parts of the APL/J approach I miss a bit and find them tedious to emulate/avoid.

reply

--

"

        The semicolon. It can be usefull to show the result when you type code in the console, but in scripts it does not make any sense that one must end a line with a semicolon in order to suppress output.
        Indexing is done with braces rather than brackets, making it difficult to distinguish it from a function call." -- http://www.pyzo.org/python_vs_matlab.html