3 ms·
The problems it solves depend a bit on where you're coming from. If you're coming from a CBOO (class based object oriented e.g. Java/C#), the biggest notable th
by adgjlsfhk1 4y ago
The problems it solves depend a bit on where you're coming from. If you're coming from a CBOO (class based object oriented e.g. Java/C#), the biggest notable thing is that a lot of the Gang of 4 design patterns go away and are replaced with "call/pass a function".
If you're coming from a functional language, the main difference is that Julia will compile specialized versions of functions for your types, and makes it a lot easier to write runtime efficient and generic code.
For a simple example of this in action, consider the following
julia> a = 1//3 # a is the rational number 1/3
1//3
julia> b = 2+3im # b is a gausian integer (complex number with integer coefficients)
2 + 3im
julia> a+b # even though these types don't know about each other, appropriate methods get called to get a complex rational result.
7//3 + 3//1*im
This might seem really basic, but you'll be hard pressed to make a system like this in another language without hard coding a list of dispatches manually.
- anigbrowl 4y agoSympy is pretty capable but not as beautiful. The first time I tried doing math in Julia was a pleasurable shock.