I've been thinking a bit about how ppl have largely heeded my advice in http://neuroplausible.com/matlab & started expanding their/others' training to be more #openscience friendly.
-
-
The 1st thing Nikolaus Rath mentions is "Lack of Documentation". This upset me too and I mentioned it in my blog above. Matlab has no BNF!!!
Show this thread -
The 2nd thing is "Ambigious Syntax". I hadn't consciously realised how bad this is until now. "There are two kinds of braces supported by MATLAB, and instead of using one kind for function calls and the other kind for indexing"
Show this thread -
So: "one kind of brace is overloaded to mean both, and the second kind is (seemingly randomly) assigned to work with just some datatypes."
Programming languages are not natural languages — this did not need to be so!
But Matlab has no BNF, burn it all!Show this thread -
This 3rd one is a killer for learning and adapting to other languages, really limiting transferable skills: "Counterintuitively limited syntax" "a variety of [...] operations [...] don't work on arbitrary expressions, but only on some specific ones [like] plain variable names."
Show this thread -
That is super bad because learning to chain stuff — Lisp, anybody? — is a powerful new way of thinking one should be learning when they learn to code.
Show this thread -
Next, 4th: "Function semantics are needlessly overloaded" E.g., "the exist function checks if its argument is either a variable declared in the current workspace, a file or directory in the current directory, a file with an extension [...] or a Java class"
Why, Matlab, why?Show this thread -
OK, this one scares me most [mentioned in my blog too] 5th: "Everything is in the same namespace" Please teach yourself & others about scope! Scope is a core concept, of programming! Matlab robs people of so many important coding experiences and skills.
Show this thread -
Read this for understanding more about scope — it's so important: https://en.wikiversity.org/wiki/Introduction_to_Programming/Scope … 6th: "Parameter names are treated as strings" this is just wrong and creepy. Variables are not strings. WTF. Just no.
Show this thread -
7th: "No 1-D arrays" Ayyy. "MATLAB does not have support for one-dimensional arrays (or lists, cell arrays, etc)." "some functions [...] return 1xN arrays [and] 0x1 arrays when the list is empty." 8th: "Cell Array Iteration is awkward" Clunky. Needlessly so! CLUNK CENTRAL.
Show this thread -
9th "Semicolon Changes Semantics" "sometimes whether an expression is printed determines how the expression behaves" 10th "Functions are too clever" "if delete finds [an * in] the given filename, it [expands the * &] deletes all matching files" I'm emotionally drained! Why...
Show this thread -
11th "No way to store static data" "You can create a .m file that defines a variable, but you cannot get access to this variable from another file without terrible contortions (aka loading the file as a string and passing it to eval())." Yikes.
Show this thread -
Finally onto something that REALLY explains a lot. Some very defensive BS I had to put up with from somebody a few months ago when I told them they should be using try-statements because they are good practice.
Show this thread -
Altho I'd no idea they were coding in Matlab until they claimed Matlab has no try. To which I replied with disbelief and then immediately looked it up. Anyway long story short it does, but it's NASTY. So this explains a little of why they were reluctant to use it, I guess.
Show this thread -
Number 11: "Programmatic error handling is near impossible"


How will students, anybody, learn to code well if they cannot learn to catch errors?!
"programmatic handling errors in MATLAB in a reliable way is near impossible."


Show this thread -
OK, now we're done, if you want to read more — and I suggest you do! — check out the blog post I based this on: http://www.rath.org/matlab-is-a-terrible-programming-language.html … And mine too for a more pedagogical perspective:http://neuroplausible.com/matlab
Show this thread -
I do not want to shame anybody but please, think again before handing down any bad habits & please bear in mind Matlab is not
#openscience not#opensource!Show this thread -
To end, I just wanna say, one of the most heartening things is seeing people like
@inferencelab blog their journey into#opensource and just generally better coding: http://www.inferencelab.com/confessions-of-a-reforming-matlab-er/ … So yeah, mad props to all of you pushing yourselves and (y)our field(s) forwards!
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.