r/Python • • Aug 05 '19

Python's response to MATLAB

Post image
4.3k Upvotes

372 comments sorted by

View all comments

Show parent comments

297

u/cue_the_strings Aug 05 '19

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.

54

u/mexiKobe Aug 05 '19 edited Aug 05 '19

The language is ugly

Not at all for numerical calculations / matrix math etc. It’s very good for that, better than Python with numpy. Look at these comparisons https://docs.scipy.org/doc/numpy-1.15.0/user/numpy-for-matlab-users.html

I mean saying it is uglier than C++ is kind of silly. Try doing simple vectorized calculations from MATLAB but in C++ and get back to me on that. And JavaScript? Come on man lol.

But yeah the problem is when engineers and scientists only use it and try to write applications with it. I’ve seen some FUCKED UP code written in MATLAB being used at huge research hospitals and in national security, and “subversioned” with duplicates on Dropbox. It’s actually extremely common, which should be shocking

0

u/[deleted] Aug 06 '19

[deleted]

4

u/mexiKobe Aug 06 '19 edited Aug 06 '19

Tensor operations are very easy with MATLAB. It’s just like any other matrix operation. I have no idea where you got this idea that you had to loop when N>2.

→ More replies (4)