
Matlab vs. Julia vs. Python - 3JPLW
https://tobydriscoll.net/blog/matlab-vs.-julia-vs.-python/
======
hprotagonist
Personally, matlab drives me absolutely up the wall when it comes to ANYTHING
other that flipping big matricies around. As a domain-specific tool for linear
algebra, I certainly prefer it over R, but as a general purpose tool it makes
me want to pull my own teeth out.

It's just not designed to make good pipeline tools that are maintainable,
easily tested, and easily refactored, and never was. Its ability to handle
things like "easy and sensible string and path manipulations" are ...
rudimentary, at best, and a weird pastiche of C, fortran, java, and whatever
else language was faddish when that feature was added.

I have more or less one real annoyance with the technical content of matlab.
(One-indexing i can live with):

    
    
      size([1])
      ans = [1 1]
    

which is flatly wrong, and numpy gets it right:

    
    
      In[0] np.array([1]).shape
      Out[0] (1,)
    

Python is actually a general purpose language which has a mature scientific
stack, and i feel more secure in my numerical computations there because i can
have a robust test suite and command line entry points into my code that
increase my confidence that my code's doing what i think it should be, and
makes it easy to use.

Packaging is more or less a coin-flip. Python packaging is a giant faff;
matlab packaging is nonexistent (you have to vendor every dependency yourself)
and expensive (your users have to shell out for the toolboxes you use, and/or
have the MCR installed and can't edit your code).

I'll maintain matlab when i have to, but i don't enjoy it very much.

~~~
commandlinefan
Yeah, I was more than a little surprised to see his perspective - I thought
for sure he was going to rave about Julia, pick on Python a little, and skewer
Matlab. My graduate thesis advisor forced me to use Matlab to do all of my
master’s thesis work, and I found it to be about the most frustrating
environment possible, at least for any actual programming. I’m a little
shocked to read that anybody uses Matlab outside of a pure academic
environment… I guess I just don’t work on sophisticated enough projects?

~~~
scott_s
The author of this post _is_ in academia, so Matlab outside of academia may be
as rare as you think.

~~~
6thaccount2
I think it is actually prevalent in a lot of industry. They don't make a lot
of money off academia with those ~$30 student licenses.

~~~
analog31
Historically, the free or cheap student licenses were believed to pay them
back when those students moved into industry and were inclined to install what
they were familiar with. There's still a lot of MATLAB in college teaching
curricula.

Part of when I help on-board newly graduated colleagues (typically engineers
and scientists, not hired as programmers) is to reassure them that they can
get a MATLAB license if will help them get productive quickly. This has
happened once or twice. Many of them never bother, as they get busy enough
with CAD and basic design work, that they don't really find a use for
scientific computation. But to an increasing extent, they're willing to make
the hop to Python, possibly just because it's a popular buzzword, but in any
event, they are able to get themselves up to speed pretty quickly.

~~~
6thaccount2
Oh I have no doubt that the cheap license is to get folks hooked, but as I
said, it is not where they make money.

A single user license and a few toolboxes brings in more cash than all the
student licenses my University probably used that year.

------
ggcdn
Matlab has its quirks, but I've never come across a better IDE for debugging
'scientific' code/scripts. Seeing current values by hovering over variables,
the ability to pause and execute some 'testing' code, or overwrite things and
carry on, being able to easily edit arrays/matrices in an excel-like table,
having matrix arithmetic that doesn't look like shit when written as code...
these are things that I find very useful. I use it in my field (structural
engineering) for those reason alone, even if it might be slower, or more
difficult to accomplish certain tasks.

~~~
0xd171
I've used quite a bit of R and Python and I've never touched Matlab. Similarly
to your comment - Python has nothing that comes even close to RStudio for
working with data. Jupyter, Spyder, PyCharm, VSCode/Atom with data science
extensions - none of them are as good.

~~~
spinningslate
Agreed. R might not have the breadth of Python, and it's less conventional as
a language (procedural, vector based).

It has some key strengths though:

1\. RStudio IDE as you note. It's a really great, focused IDE for doing most
of the things people do with R.

2\. Shiny. Such a well conceived and constructed toolkit for building
interactive apps

3\. The package ecosystem: lots of really good quality, high performance
packages

4\. RStudio the company, who contribute a lot to the community - both open
source (RStudio IDE, Shiny, tidyverse, ...) and commercial (RSConnect, Package
Manager).

From a language design pov I like Julia over Python over R. But for number-
heavy computing I prefer the R ecosystem overall.

~~~
0xd171
On the other hand, base R has to maintain (some degree of?) compatibility with
S. Which means that all the strange design choices and weird behaviour in base
R have little hope of ever changing. No number of additional packages can fix
this.

~~~
tylermw
There is one nice thing about R core's focus on maintaining backwards
compatibility, however: code from a decade ago (more often than not) will run
without a hiccup on current versions of R.

Related tweets:

[https://twitter.com/hrbrmstr/status/1124016682413039616](https://twitter.com/hrbrmstr/status/1124016682413039616)

[https://twitter.com/hrbrmstr/status/1122186751987073025](https://twitter.com/hrbrmstr/status/1122186751987073025)

------
ohsonice
My (math graduate school) perspective:

MATLAB is adored in academia for a number of reasons. It is easy to make
readable small scripts for in-class examples. The debugging feature/IDE is
easy to navigate. The school pays for the licenses; there is no overhead work
to compile or download packages (unless you want to do something 'fancy').

I took a ML course that was taught in Python. All my Numerical Analysis and
Modeling courses relied on MATLAB for examples and homework. I (as a
programmer outside of just the math world) picked Julia for research. Now I do
much more theoretical research, as I did not enjoy mixing coding and
mathematics.

A fellow student, developing PDE solvers in FORTRAN was told by a mentor to
get it to work in MATLAB first and then move on to faster languages.

Happy to answer any questions :)

------
cycomanic
The biggest gripe I have with matlab is that it teaches absolutely horrendous
programming habits. Most of the graduate students that only used/learned
matlab in their studies (I'm in an engineering field) program everything into
one big script which they copy around and change a couple of parameters. Now
obviously you can do things properly in matlab, it's just matlabs structure
encourages you not to (who thought that one function per file and no
namespaces are a good idea?!) Students who used Python on the other hand
typically have much better programming habits (not necessarily good), I think
because of it's roots as a programming language first, you get much more
exposed to programming paradigms when you learn it.

The other thing I found weird was the complaint about matrixes objects being
deprecated. After the addition of the '@' operator it is really the same as
matlab, except their default is a matrix, while for numpy it's an array. As a
side note the author complains about the '@', what about matlabs stupid
decision to use the most easily overlooked ascii character for distinguishing
between matrix and element wise operations. In my experience, almost all the
time a matlab calculation returns weird or garbage results, the bug search is
a "find the missing '.'

------
hprotagonist
_This [Julia] is the first language I’ve used that goes beyond ASCII._

Python 3 has supported unicode variable names for 12 years. Not all of unicode
is permitted, but all the useful bits are.

~~~
3JPLW
Subscripts and superscripts are probably some of my most-used unicode
identifiers. Supported in Julia but not Python 3.

    
    
        In [1]: α₁ = 1
          File "<ipython-input-1-3c2973844bb9>", line 1
            α₁ = 1
             ^
        SyntaxError: invalid character in identifier

~~~
Skunkleton
Out of curiosity, how do you physically enter these subscripts? It seems a
standard keyboard would be somewhat limiting.

~~~
3JPLW
It's just a simple tab completion in the REPL and usual editors, see:
[https://news.ycombinator.com/item?id=20346931](https://news.ycombinator.com/item?id=20346931)

------
dcolkitt
Matlab sells its onerously expensive licenses by marketing itself as having
unbeatable numerics performance. This is mostly a farce.

The vast majority of Matlab's vaunted numerics performance comes from using
MKL instead of OpenBLAS. However Intel has made MKL free software. Meaning
that you can easily build NumPY on top of it. Numpy+MKL will compile down to
virtually identical assembly as Matlab.

There's very little reason in this day and age to pay Mathworks such an insane
licensing fee.

~~~
zild3d
> Matlab sells its onerously expensive licenses by marketing itself as having
> unbeatable numerics performance.

Not at all. At Lockheed (probably one of Mathwork's biggest customers) the big
use case is the toolboxes. Scientific/engineering packages like signal
processing, radar, phased array, embedded/VHDL are 2nd to none and are used
daily. Some sites also used a lot more of the Simulink side for modeling &
simulation.

[0] [https://www.mathworks.com/help/signal/ref/signalanalyzer-
app...](https://www.mathworks.com/help/signal/ref/signalanalyzer-app.html)

[1] [https://www.mathworks.com/help/comm/examples/rf-satellite-
li...](https://www.mathworks.com/help/comm/examples/rf-satellite-link.html)

[2] [https://www.mathworks.com/help/fusion/examples/multi-
patform...](https://www.mathworks.com/help/fusion/examples/multi-patform-
radar-detection-generation.html)

[3] [https://www.mathworks.com/products/hdl-
coder.html](https://www.mathworks.com/products/hdl-coder.html)

~~~
ska
Only some of the packages are 2nd to none, but as you note some of them like
Simulink have large and dedicated userbases. I've heard very mixed results
from the VHDL stuff, but some people love it.

------
rrss
Matlab is a calculator. It is a _really nice calculator_ for some things, but
its definitely a calculator with programming language features bolted on. I
strongly believe that Matlab is unsuitable for writing most software. It is
nonetheless extremely popular in some engineering fields for write-only
scripts.

I'll never forget when I took a controls class and we were given an option to
use Python on our own or matlab with guidance and support from the professor
and TAs. I chose Python since my background was slightly different that most
of the students, but most everyone chose matlab. It was highly amusing to
watch the whole lab suffer for days because no one understood matlab's
semantics. (The base framework had been written by some expert who retired and
made extensive use of both handle and value classes. Problem was, no one still
involved with the clas knew what the difference was.

Meanwhile, I spent about 6 seconds longer writing out np.dot a few times.

Matlab is good for math. Most software (even math heavy stuff, EM simulations,
etc) has little math (in terms of source, no execution time).

------
usgroup
"MATLAB is the BMW sedan of the scientific computing world. It’s expensive,
and that’s before you start talking about accessories (toolboxes). You’re
paying for a rock-solid, smooth performance and service..."

mmmmhmmmm...

------
tcpekin
I do scientific programming in both Python and Matlab. The two things that to
me are major benefits of Matlab are the ease of setting up your installation,
and the documentation. The Matlab documentation is amazing when compared to
the numpy/scipy documentation, and is almost reason alone for a beginner to
use Matlab. FWIW, the Mathematica documentation is also fantastic.

------
WhompingWindows
Where is the discussion of R? You talk of scientific computation and don't
speak of R? That's an oversight, given the majority of the scientists I know
have used R. There's also STATA, which economists love, which can do
somethings in my workflow much quicker than R. There is also a huge contingent
of analysts that uses SAS, especially in healthcare and finance.

The car analogies in the blogpost are not particularly useful... Why do people
feel the need to dumb down a topic with off-the-wall analogies? Talking about
Julia like it's Tesla is laughable. Tesla is a huge innovator, Julia is
another tool that does similar things to the other tools. The apt analogy for
Julia would be a new ICE company, not a new EV company.

~~~
roel_v
There is a lot more to scientific computation than statistics, and the only
thing R is good at is statistics.

~~~
kgwgk
It's quite popular in bioinformatics as well:
[https://www.bioconductor.org/](https://www.bioconductor.org/)

~~~
lbeltrame
Unfortunately the quality of the Bioconductor packages varies wildly, from
pretty good to downright abysmal.

Some can't even work: take a look at this one[1], which is part of the current
release of BioC: it will _never_ work because the hardcoded host there is no
longer functioning and the author wrote that for their master's thesis and
have since moved on.

In addition, there's no centralized bug reporting, and some packages use GH
issues while for others you may need to email the author and hope for the best
(sometimes works, sometimes doesn't).

I use BioC regularly every day because I have no other alternatives, but its
main advantage is the sheer numbers of packages available for almost every
bioinformatic niche, rather than the quality of the packages themselves.

[1]
[https://github.com/AllenTiTaiWang/anamiR/blob/7a7a133c553f8c...](https://github.com/AllenTiTaiWang/anamiR/blob/7a7a133c553f8c3262cec65d86735fe121049456/R/database_support.R#L80)

------
w_t_payne
I've a lot of experience with both MATLAB and Python. I find Python to be the
better designed language, with fewer rough edges. But MATLAB still promotes
and encourages the most productive approach to programming, one that NumPy
_just_ falls short of.

~~~
dagw
For exploratory work MATLAB and the MATLAB IDE are pretty good and shorter
scripts are fine. However once you start trying to write actual programs and
pass 1-2 kLOC or so, MATLAB just gets more and more painful.

~~~
ChrisRackauckas
And "MATLAB packages" are especially painful. The fact that you "install
packages" by adding folders to the path is somewhat insane, especially since
that is somewhat of a silent global change. I think the hardest thing to do
with MATLAB is get someone else's scripts running, because it's always like
"oh I forgot to give you my special plot function which I keep in this folder,
but requires other things, so just add this whole thing to your global state,
but it's incompatible with XXX since I use a function named A". Remembering
those incidents makes me shed a tear... while Python and Julia allow you to
import without sending every internal name and you're done. And in Python and
Julia, people add continuous integration tests to packages.

~~~
makmanalp
I like to say that Matlab was designed by applied mathematicians who don't
want to care about software engineering, and python+numpy+scipy was designed
by software engineers who don't want to care about applied mathematics :P

I don't know that that's strictly true but it gives you a general idea for why
things are the way they are.

~~~
rightbyte
Somehow it's nice to have a global namespace so I dont have to remember which
libs have "plot()" or "sind()".

Nothing beats Matlab/Gnu Octave for me when I just want to make some quick
calculations.

~~~
ddragon
Julia "default" behavior (the 'using' keyword) is also importing everything
(that is exported on the selected module) to the global namespace, using
multiple dispatch to safely assign the optimal implementation of each function
for each argument set without clashing. It's not unusual in Julia to have one
function with more than a hundred implementations, and the user doesn't need
to care which one will be chosen.

Though you can also use 'import' to keep the namespaces separate.

~~~
ChrisRackauckas
It's not really a default though. You have to always choose to do `using`
instead of `import`. A lot of people choose `using`, because it's generally
more safe than something like MATLAB or Python because of multiple dispatch,
but there's nothing in the language that actually defaults to `using` other
than the convention of some people.

------
cfusting
The choice of language usually comes down to the packages. In any of the three
aforementioned languages one can easily and quickly manipulate matrices short
of an unwillingness to learn. Julia is nice because it's fast with native
code. Python is nice because of Scipy. Matlab is nice because it decides how
to spend your money without cause.

I'm an AI researcher / practitioner. For me code accompanying papers is very
useful and usually this code is in Python. Occasionally it's Matlab but let's
be honest, who cares about those papers :). I'd love to use Julia but the
package support just isn't there. Ironically people like me are supposed to be
writing this code but with a demanding job and a family it's not likely I will
be improving their DataFrame effort anytime soon.

Anyway the MAIN reason I use open source software is because if it isn't
working correctly I simply fix the code myself. This isn't possible in the
proprietary world. Why would you trust your research or production work with
code you can't see and edit?

There's been a lot of talk about documentation. Docs are secondary sources,
like WIRED, read the code if you're serious about being correct. Even
(especially) hired hands make mistakes and fail to write good tests.

This article reminded me of the fictional Simpson's news article "Old Man
Yells at Cloud". It's funny, and he may have a point, but it has no relevance.

------
Bostonian
The author does not mention modern Fortran, which does have array operations,
like Matlab, Python/Numpy, and Julia. I wonder if its lacking a REPL is the
main reason why.

------
Paul-ish
I suspect doing all this in the context of a numerical analysis textbook has
contributed to the authors prespective. One nice thing about Python is that
you can build and prototype applications and services around it. This is
important as many applications need numerical analysis. Could you imagine
writing your entire application in matlab?

------
enriquto
I find it quite ridiculous that a discussion about the matlab language in the
context of free software projects does not even mention the excellent
interpreter Octave. I say "ridiculous" to be generous; in reality it seems
mostly bad faith.

~~~
cr0sh
I noticed that, too. I don't understand why Octave is this "dark horse" when
it comes to these kinds of things...

------
jacobolus
Toby Driscoll is the author of a great Matlab library for computing conformal
maps, the Schwarz-Christoffel Toolbox

[http://www.math.udel.edu/~driscoll/SC/](http://www.math.udel.edu/~driscoll/SC/)
or on github [https://github.com/tobydriscoll/sc-
toolbox](https://github.com/tobydriscoll/sc-toolbox)

But I can’t say I agree with much of this.

> _One function per disk file in a flat namespace was refreshingly simple for
> a small project, but a headache for a large one._

This is an absolutely horrible bonkers limitation for a “small project”. It’s
“refreshing” like someone constantly dumping buckets of ice water over your
head. Being able to define functions in the repl, export multiple functions
from a single file, etc. are things I pretty much can’t live without in an
interactive programming language. Needing to make every tiny utility function
into its own file adds _SO MUCH FRICTION_ to basic prototyping workflows.

The result is that when working with Matlab I try to make as many functions as
possible into lambdas, e.g. square = @(x) x∗x. But these are very limited in
practice, and the workarounds to make a function work as a lambda often
compromise readability, performance, correctness, and functionality.

\+ + +

Is an occasional V.conj().T @ D∗∗3 @ V really that much worse than V' ∗ D^3 ∗
V?

I find that in even small programs, syntax complexity and clarity is dominated
by logic flow rather than matrix multiplication. My Python programs end up
dramatically easier to read than my Matlab programs, including the almost-
pure-numerics parts of them.

If concise built-in syntax for numerical operations were our highest ideal,
we’d all be using APL.

> _exists a matrix class, and yet its use is discouraged and will be
> deprecated_

I think Driscoll doesn’t understand what’s going on here. There is plenty of
discussion for someone who searches about the problems with the matrix class.
The matrix class dated from a time when there was no @ operator, so ∗ was used
for matrix multiplication instead of elementwise multiplication. This made it
inconsistent with everything else and artificially limiting in obnoxious ways.
Now that Python has an @ operator it is no longer useful or necessary. This
has nothing to do with matrices being important or not.

> _Matplotlib package is an amazing piece of work, and for a while it looked
> better than MATLAB, but I find it quite lacking in 3D still_

YMMV, and maybe I’m spoiled by D3, Vega, Altair, ggplot2, etc., but I really
don’t like Matlab’s plotting tools or Matplotlib. They are inflexible and full
of arcane details, and produce mediocre output. We should aspire to better
plotting than those in all of our environments.

\+ + +

> _The big feature of multiple dispatch makes some things a lot easier and
> clearer than object orientation does._

This is partly because Matlab’s version of “object orientation” is a
horrendously broken pile of trash.

> _Partly that’s my relative inexperience and the kinds of tasks I do, but
> it’s also partly because MathWorks has done an incredible job automatically
> optimizing code._

I’ve poked around in several large Matlab projects, and there are huge
performance problems everywhere. In particular any project using Matlab’s
version of object orientation ends up incurring huge amounts of overhead.

\+ + +

Overall my impression is that Julia (and Matlab’s) language choices are driven
by people who want to directly type their math paper into a program with as
little thought and as few changes as possible.

For folks with decades of experience reading and writing math papers, this is
fair enough I guess.

For many people from a software background it seems like a poor choice of
priorities.

Programs written by researchers are often unintelligible without the
accompanying paper (and sometimes with, depending on the paper). Full of
1-letter variable names defined off-screen somewhere with no comment
explaining what it stands for, weird API inconsistencies, lack of structure,
hacks that worked on one set of inputs for a demo but don’t handle edge cases,
....

~~~
SolarNet
My position is that despite all of Julia's problems (many of the worst being
internal) I think it's the best choice of the three. And at least as far as
the move from MatLab to Julia that's just a win for all of science.

> This is partly because Matlab’s version of “object orientation” is a
> horrendously broken pile of trash.

Sure, but also multi-methods are objectively better than single dispatch
object systems. And per Graham's web of power this is easily demonstrated by
the fact that what a multimethod can do in one line, a single dispatch system
requires n^m (n being objects in the hierarchy, m being the number of objects
in the call) lines of pattern code (sans any meta programming features of
course) to match in expressiveness.

The fact that Julia can use multi-methods with type inference to improve the
compilation of typeless methods to the level of native compiled program speeds
is just gravy.

> I’ve poked around in several large Matlab projects, and there are huge
> performance problems everywhere.

A problem python can share, with the worst offenses requiring rewriting the
given chunk of code in a different language and then writing bindings for it,
and managing the compilation of it.

And that Julia works very hard to avoid, through it's gradual type system
(often allowing a programmer to add a type to a single line of code and have
the entire project get 10x performance gains) and multimethods (allowing
programmers to optimize specific edge cases without intruding on the formula
code).

> Overall my impression is that Julia (and Matlab’s) language choices are
> driven by people who want to directly type their math paper into a program
> with as little thought and as few changes as possible.

Yes, but at least Julia does so in a way that allows for professional
programmers to easily work with and maintain it. Between multi-methods,
optional typing, choose-your-own-starting-array-index, a programmer can modify
an existing Julia code base without the language itself being the problem.

Julia could certainly do better here - they are often hostile to attempts to
improve the software engineering story around Julia - they at least have a
path forward for a programmer attempting to maintain or optimize their
scientific computing code in a sane way. Something that neither python nor
Matlab can really claim.

~~~
byt143
What do you see as Julia's most egregious problems, internal or otherwise? and
internal in particular?

~~~
SolarNet
I think the most egregious problem from a holistic perspective is their lack
of prioritization for software engineering. Things like packing large amounts
of specialized mathematics constructs (and whole libraries like git and
markdown) into the main distribution (causing memory size and startup time
problems), lack of interfaces or similar abstraction tools (which are strictly
speaking not necessary from a functionality perspective, but are useful as
organizational and code safety tools), and an inability to tune their garbage
collector. Their debugger was also pretty shoddy when I last used it (e.g. it
wasn't a priority for many years), but I'm pretty sure they have fixed it
significantly by now. And hey they have macros, which just invokes the
problems with lisps, but at least you can do whatever you want programming
construct wise if you really want to.

"Internally" they have some poor interactions with external developers
(meaning people not from MIT). [deleted a rant] In the end I suspect Linus is
probably worse to work with, it probably comes with the territory, so it's not
like it's a deal breaker.

All of this is to say I agree with this article:
[http://worrydream.com/ClimateChange/](http://worrydream.com/ClimateChange/)
one of the best things a programmer can do is contribute to tools,
specifically including Julia, which advance our ability to understand climate
change. It really is in my opinion the best programming language to further
scientific advancement. I just wish I had the capability to work with them.

------
Aardwolf
> And there’s zero-indexing (as opposed to indexes that start at 1)

What, and that's exactly the part I dislike about both Matlab and Julia! The
amount of "\+ 1" and "\- 1"s in matlab indices you need when subdividing
matrices into multiple equal sized parts is horrible.

Weird, I thought mathematicians would know better what makes sense and what
not. Starting with an offset of 1 is clearly what does not make sense, you
start at distance 0 from your starting point.

~~~
lmkg
In mathematics, a matrix doesn't have an 'offset' or a 'starting point.' I
think that perceiving matrices in those terms is an artifact of thinking of
matrices as sitting in an address space, where the elements of your matrix are
part of a larger span that can contain other data.

A matrix is a collection of elements and nothing more. Indexing starts at 1
because that's the first element in your matrix, and numbering the first
element 1 makes sense. Numbering from 0 makes sense when it represents an
offset into something, but a matrix isn't that. 0-based indexing just always
feels to me like letting the implementation details leak out. (I don't feel
this way when an array actually represents a chunk of memory, rather than a
math object.)

The proliferation of +1 and -1 depends on the application. Some work better
with 1-indexed, some work better with 0-indexed. Personally I get annoyed at
having to use `len-1` too often when working with 0-indexed arrays. This is
why some languages like Julia (and FORTRAN apparently?) let you choose your
index-base, which... has trade-offs.

~~~
Aardwolf
> and numbering the first element 1 makes sense

Why?

~~~
improbable22
Ever heard someone talk about their zeroth kid, without making a programming
joke? English counts objects one two three. I've never heard of a natural
language doing otherwise, we would surely translate what they say when
pointing at two apples as "two".

Mathematicians of course label objects however suits the problem at hand. It's
extremely common to write say c_0 + c_1 x + c_2 x^2 + ... for a taylor series
starting with a constant, or start at -1 or -n if that's tidier.

~~~
Aardwolf
No, but mathematics is not spoken language... the origin of the number line
happens to be at 0, not at 1. If you start indexing at 1, you're missing a
piece. That may not be noticeable if all you do is index a fixed size thing
with a manually chosen index, but as soon as you need to compute with the
indices themselves, you notice it, and it's not pretty.

I'm not going to say "zeroeth" in spoken language, but for any serious
computation, you're going to be indexing variable sized things and need to
compute the indices themselves. And I don't want to make code or formulas less
readable due to shifts by 1.

~~~
improbable22
Like I said, what's most readable is problem-dependent. Sometimes it's about
modular arithmetic, but sometimes it's about not having to say Γ(n+1) too
often.

The number line concerns real numbers, not elements.

~~~
userulluipeste
This discussion provided me some food for thought. You (and the Matlab, and
many other like-minded individuals) have chosen is to work with natural
numbers¹ as indexes as these provide the most value for the amount of hassle.
Having a 0 based index model is not really a choice the moment where one gets
forced to work with the indexes themselves. That is especially when there are
negative indexes to be considered, like we happen to encounter in the real
world. What is the chance to go on past the integers, having a proportion or
some irrational number² like π as index?

¹
[https://en.m.wikipedia.org/wiki/Natural_number](https://en.m.wikipedia.org/wiki/Natural_number)

²
[https://en.m.wikipedia.org/wiki/Irrational_number](https://en.m.wikipedia.org/wiki/Irrational_number)

------
inamberclad
What kills me about MATLAB is that it's CLI still doesn't have any terminal
shortcuts beyond Ctrl+C. No Ctrl+D, no Ctrl+W, no Ctrl+left arrow or
Ctrl+right arrow.

It's also a gigantic memory hog and all the plots are copy-on-write, and the
memory usually isn't deallocated afterwards.

------
Lowkeyloki
Specifically the author's mention of extended character support in Julia for
math symbols, as well as the emphasis on matrix support, makes me wonder why
APL didn't maintain popularity among the academic crowd.

~~~
6thaccount2
Well...the reason is APL can't do scientific computing well.

It doesn't by default have scientific libraries and builtins for solving
equations. It has a fast interpreter, but scientific computing often needs
much faster.

It was also late getting off the mainframe.

I really like APL, but it doesn't have the horsepower for my needs.

------
hnjst
There is also a completely different but complementary set of tools that
handle formal calculous such as Maple and its libre alternative Maxima that
are worth consideration.

------
musicale
Mandatory matlab in coursework is usually harmful and should be avoided if
possible.

Julia and python are full-featured languages that aren't marketing for
mathworks.

------
diminoten
I just don't think this guy tried at all to account for his biases, and that
sort of makes the entire article hard to believe beyond his MATLAB
experiences.

~~~
geoalchimista
I would dismiss a lot of his comments on Python because they were so biased by
his preference of a MATLAB-like syntax.

------
wvlia5
Run this python jewel:

exec(''.join(chr(int(''.join(str(ord(i)-8203)for i in c),2))for c in '
'.split(' ')))

