In my experience, a programmer saying they actually like MATLAB means they either know very little about general programming, are not primarily a programmer but an engineer or have been pidgeonholed into doing just one thing that MATLAB does okay for quite a while.
The language is ugly and some relatively normal features are horribly clunky to use (object-oriented stuff, GUI primitives, ...), antiquated syntax that reminds me of BASIC. If you used any moderately modern language, (C++, Java, JavaScript, Python, Rust, Nim, ...) or even old ones like C, Lisp, Haskell - you just cannot like it.
My favorite thing about Matlab is it has both i and j defaulted as the imaginary unit, but will silently let you overwrite those values. I'm not saying that's an invalid design decision, but it doesn't really make sense to spring on the intended audience: physicists/engineers/etc who don't really have a programming background but need to be able to code some simulations. That crowd is often going to want to basically just type in the equations in their textbooks (hence reserving both i and j for the imaginary unit—in electrical contexts, i is current, so they use j for the imaginary unit), which will often result in looping over ijk indices since those are what textbooks usually use for 3D vectors/matrices. That crowd will also typically not have the background to realize the potential problem here.
I found out about this via someone on reddit saying that they spent an entire summer pulling their hair out trying to figure out why their complex equation was returning a pure real result and finally figured out it was because he'd used i as a loop variable and instead of being reset to sqrt(-1), it was staying as the last value it hit while iterating through the loop. If they want to keep the behavior they should really at least print a warning about what you're doing to the console.
Again, Matlab is targeted at non-programmers, which is the kind of audience you might expect to assume that the scope of the ijk being used as loop variables is restricted to the loop.
426
u/Stereoisomer Aug 05 '19 edited Aug 05 '19
In my experience, a programmer saying they actually like MATLAB immediately attracts every python dev in a five mile radius
Edit: someone edit this meme and post here for a karma double-dip I’m too lazy