Hacker News new | past | comments | ask | show | jobs | submit login

Question - because I haven't looked into Julia yet:

What's the main selling point of Julia, over Python?




For me the main selling point is speed. I had coded a simulation in Python which was slow (would have taken days for the whole thing to run). This version did not use Numpy. Then I coded it in Python so that I could use Numpy. Just to be able to use Numpy I had to use arrays, where it did not seem natural for the problem I was solving. The numpy version gave me a 5 times speed up compared to the original Python version. I then coded it in C, which was about 20 times faster than the numpy version (and 100 times faster than the original version). Then I coded it in Julia, which was much easier to code in than coding it in C as well as Numpy. I could use loops where they felt more natural to me. It was essentially like the C code, but using many high level functions that Julia provides. Not a least bit difficult than the original Python version, would even say that it was a bit easier. The Julia code ran just as fast as C.

Other benefits (not over Python, but I believe worthwhile when choosing a language): very friendly community to beginners. You ask simple questions and get answers without any attitude. As I noted above, many high level functions that make dealing with data much easier.

If you are going to try it out, I would recommend using the Long term support release, rather than the current stable release. With the latter, I have had issues where some packages often don't work for me. With the LTS release, I have yet to experience that. Maybe I am doing something wrong, but for me LTS release works great.


The power of Lisp but without parentheses so Lispers can have something to complain.

But seriously, for me is something similar to Python vs Ruby (I used to prefer programming in Ruby before Python became the default ML language and made so I pretty much had to change). Like Ruby, Julia is a language that I can adapt to the problem instead of having to adapt the problem to the language. In Python there is only one obvious way of doing it (at the higher level) no matter what the problem is, usually some hard to read chain of pandas transformation followed by not much better numpy/jax or pytorch method. In Julia I feel less restricted, and if a problem is clean using loops and arrays I do with loops and arrays, if it's clean with vectorization I do that with broadcasting, if someone enabled some macro that looks almost like a description of the problem I can use that as well.

And the result ends up not being what people fear that having many ways to do something means the programmer will abuse it and write unreadable code golf, but having a more natural approach to each problem makes it easier for me to read after it's done, it's not language A twisted in language B (like those pandas operations), but something that is close to a direct representation of language A that I don't need to convert mentally or even with a dictionary.


The main selling point is the speed. Julia is high performance - in the same class as C, C++, Rust etc (perhaps 1.5x slower on average, but still pretty fast). This allows you to write all your code in Julia rather than just the surface level wrapper.

Then, because it's 20 years younger than Python, it has tonnes of ergonomics you would expect of a modern language: A nice, built-in package manager. Good code introspection. Easy ability to call C. An actually usable REPL. Built-in unit testing etc.


There are several: https://arstechnica.com/science/2020/10/the-unreasonable-eff...

Also comes with some, but relatively light trade-offs for what's gained, IMO. The worst of trade-offs, compile overheads, are mostly not intrinsic to Julia and are being reduced every release and by packagecompiler.jl.


Of course it's intrinsic to Julia. What do you mean? Julia is a JIT-compiled language, and so gets the curse of JIT-compilation: Compilation latency. That's unavoidable*

* Okay, technically, someone could write an interpreter for Julia, or do streaming compilation, but I wouldn't hold my breath for this to actually happen.


Julia already has an interpreter, and the core team has plans for tiered compilation.

Also the JIT compile time can be minimized to the point where it's a very minor thing. There's also smarter and slimmer static compile, which is also planned.


Speed. Multiple dispatch. A language actually designed for numerical work and data science and all that, instead of a language that accidently found a niche there. A chance to look at the status of Python and fix it's pain points.


S was designed for numerical work/data science, so R did inherit lots of this.

To be fair, this was back in the seventies, so it's good we're getting another language designed for this problem space.


native performance for things you run repeatedly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: