MATLAB to Julia wiki

IMO Julia requires a very different approach (small, modular functions, loops or broadcasting instead of vectorization, attention to type stability, etc), so while it is relatively easy to make a “literal translation” of simple Matlab scripts, the performance is often disappointing because of these gotchas. I have seen some people do this and conclude that Julia is super-slow.

Also, while there are of course exceptions to this, many Matlab scripts that I have seen are just badly written from a software engineering perspective — brittle to implicit or hidden assumptions, composed of large, monolithic functions, makign extensive use of global variables, and consequently lacking unit tests.

I am not suggesting that this is a feature of Matlab, but rather the culture that has grown around it, with books listing code snippets as solutions and suggesting that you solve problems by copy-pasting and modifying previous code. There is a lot of Matlab code out there, but perhaps the part that should be saved for posterity should be rewritten. This is in sharp contrast to, say, Fortran code I see floating around: most of it is carefully documented, organized, and tested.

7 Likes