|
|
|
|
|
by FridgeSeal
2851 days ago
|
|
I’ll have a stab at answering this, someone who knows better can correct me. Dynamic with optional typing. General consensus is that it has a pretty great type system. Union types, language level implementation of high performance missing types.
Garbage collected.
JIT compiled using LLVM backend; entire language is written in itself, so the compiler doesn’t have any “black boxes”, I.e. it can optimise everything.
Great multiple dispatch system.
Imperative technically I guess? But feels like it’s lifted a bunch of good ideas from various functional and domain specific languages. Anything I missed? |
|
JIT is better described as "extremely lazy ahead of time compilation" (not my words). Except for globally-scoped commands, e.g. REPL (I think?) code is always going to be compiled before it is run.
Some examples of fantastic things I've done with julia:
1) wrote a drop-in replacement to IEEE floating point and evaluated numerical performance in operations like FFT, linear algebra, machine learning... I only had to write the basic operations + - * /, and a few algebraic functions like one(T). Everything else (matrix mult, linear solving, complex numbers) came for free.
2) wrote a Galois field type and ran experiments on Reed-Solomon erasure coding. Didn't have to rewrite the linear solver \ function. The builtin one worked just fine - well, in version 0.5 I had to patch it, but it worked great in 0.6 and beyond.
3) wrote a DSL that would "write verilog for me". I could pass an integer type and validate easily that the wires had the result I expected, then use the multiple dispatch on a "semantic type" which was a wrapper on String, which literally generated verilog instead of doing operations on numbers. Then I used verilator (an open source verilog -> C transpiler) to dynamically generate the verilog into a .so file, upload it back to julia, and then run full set of unit tests against both. This suite took me a week to write.