(no title)
zevets | 3 months ago
Julia is phenomenally great for solo/small projects, but as soon as you have complex dependencies that _you_ can't update - all the overloading makes it an absolute nightmare to debug.
zevets | 3 months ago
Julia is phenomenally great for solo/small projects, but as soon as you have complex dependencies that _you_ can't update - all the overloading makes it an absolute nightmare to debug.
SatvikBeri|3 months ago
The tooling makes it easy to tell which version of a method you're using, though that's rarely an issue in practice. And the fact that methods are open to extension makes it really easy to fix occasional upstream bugs where the equivalent has to wait for a library maintainer in Python.
500kloc Julia over 4 years, so not a huge codebase, but not trivial either.
pjmlp|3 months ago
brucehoult|3 months ago
What Ada (and Rust) calls generics is very different -- it is like template functions in C++.
In those languages the version of the function that is selected is based on the declared type of the arguments.
In CLOS, Dylan, Julia the version of the function that is selected is based on the runtime type of the actual arguments.
Here's an example in Dylan that you can't do in Ada / Rust / C++ / Java.
The `n == 1` is actually syntactic sugar for the type declaration `n :: singleton(1)`.The Julia version is slightly more complex.
This is perhaps a crazy way to write `fib()` instead of a conventional `if/then/else` or `?:` or switch with a default case, but kinda fun :-)This of course is just a function with a single argument, but you can do the same thing across multiple arguments.