Really? I find Julia can express mathematical ideas very succinctly, it’s almost literal translation of algorithm straight into code. I find it quite the opposite actually - Python code tend to be a bit more verbose due to numpy syntax.
These kind of sentences makes me wince. If a program is faster (in terms of human coding), then they may not have as few lines of code as python, and if a language can express the same thing in fewer lines then they can argue that it takes longer to come up with these shorter lines.
It’s too good a cover. I think more precise language is called for.
In my experience, Python and Julia code is mostly similar in size, with Julia often be slightly shorter / easier.
If performance matters, Julia code is usually much simpler than Python, because special techniques (like vectorization, Numba, etc.) are required in the latter.
Unbalanced code with the omission of ends always hurt my eyes. Our ancestors had good reason when they wrote end do, end if, end function, end program, etc. Short code can be horrible for both humans and machines, look at this:
(lambda f, n: f(f, n))(lambda f, n: [(not n % 3 and "fizz" or "") + (not n % 5 and "buzz" or "") or n] + f(f, n+1) if n <= 100 else , 1)
from itertools import cycle
(x or n+1 for n, x in enumerate(map(''.join, zip(cycle([''] * 2 + ['fizz']), cycle([''] * 4 + ['buzz'])))))
Of course one can write bad code in any language, but the languages are, in large part, those who give people permission to do so.
It’s a strange sentence to me. Is the implication that it takes longer to learn how to use fewer lines in Julia? Also I don’t think writing fewer lines of code is a very good goal in general. I don’t write
julia> for i in 1:10;println(i);println(i^2);end
very often even though it reduces the number of lines from the way I usually express this by a lot.
I don’t have much experience in Python but I spent years in R learning shorthand syntax for packages like data.table to get performant code. Way fewer lines, much longer learning time, not easily understood by people who do not know the package.
See also the last sentences:
The programming language is used by Google as a research language. Julia in combination with Google’s hardware Tensor Processing Units was the best combination for fast and easily expressible machine learning computation.
Could be! It makes me wonder if this quote from @viralbshah is genuine:
If you are building a new search engine that’s heavily mathematical, or trying to predict the weather, or discovering a new bug, that’s where you use Julia. But if you are building a mobile app, Julia is not an answer to that. It’s for very large data sets, and where you are building a complex algorithmic application.
I think the claim is that python is less verbose than Julia, which seems way off to me. But the linked article is of such modest ambition and quality, that I don’t think there’s much point in over-thinking it.
as a community we can put out more positive content. i think their point might resonate with some ppl as well. So I guess it’s about knowing such sentiments exists, but work to change things we can improve would be my general approach.
It shouldn’t — people are free to write what they like, we have no control over this, which is fine.
What you have some control over is whether to disseminate this kind of information (eg by discussing and linking to it, Google will rank it higher). If these kind of articles bother you, it is just best to ignore them.
I hated about Python that it creates clumsy gigantic code when you are doing complex math … I only looked at Julia because Julia helped me express my concepts in fewer lines of code. It took me a few hours from my start at learning Julia to completely porting three months worth of python code … only requiring 1/10 of the code length.
I’m a mathematical epidemiologist (topical at the moment…). I only found Julia because I was looking for a language to code in when I wasn’t do something “serious” in C++. Hated the R syntax, looked at Python and got bored having to think hard about vectorisation even to do something “non-serious”.
Basically, googled “Is there a language that is like Python but isn’t crappy” and found Julia 0.6.
I struggle with the idea that there is enough difference between the high-level syntax of Julia and python that anyone would really prefer one to the other. Julia steals all Python’s syntactic sugar.
Julia wasted perfectly good opportunities to be wacky with whitspace. In particular, the MONGOLIAN VOWEL SEPARATOR (U+180E) should utilized for some crucial piece of syntactic distinction as it is both tricky to input and invisible in a lot of IDEs.