Hacker News new | ask | show | jobs
by EvanMiller 4574 days ago
I like Julia because in many ways, it's a better C than C:

* You can inspect a function's generated LLVM or (x86, ARM) assembly code from the REPL. (code_llvm or code_native)

* You can interface with C libraries without writing any C. That let me wrap a 5 kLoC C library with 100 lines of Julia:

https://github.com/WizardMac/DataRead.jl

* You can use the dynamic features of the language to write something quickly, then add type annotations to make it fast later

* Certain tuples are compiled to SIMD vectors. In contrast, the only way to access SIMD features in C is to pray that you have one of those "sufficiently smart compilers".

* Like C, there's no OO junk and the associated handwringing about where methods belong. There are structures and there are functions, that's it. But then multiple dispatch in Julia gives you the main benefits of OO without all the ontological crap that comes with it.

For me, Julia feels like it's simultaneously higher-level and lower-level than C. The deep LLVM integration is fantastic because I can get an idea for how functions will be compiled without having to learn the behemoth that is the modern x86 ISA. (LLVM IR is relatively simple, and its SSA format makes code relatively easy to follow.)

Anyway, I only started with Julia recently, but I'm a fan. I should also mention that the members of the developer community are very, very smart. (Most are associated with MIT.) BTW I am starting a Julia meetup in Chicago for folks in the Midwest who want to learn more: http://www.meetup.com/JuliaChicago/

1 comments

> There are structures and there are functions, that's it. But then multiple dispatch in Julia gives you the main benefits of OO without all the ontological crap that comes with it.

Multi-dispatch is a form of OO.

I would argue that it's the other way around: single-dispatch o.o. is a special case of multiple dispatch.
Agree. The point being that OO is not plain Java or C++, there are many concepts around what OO is all about.