7 ms·
> I’ve read some Julia source and its an awful experience trying to figure out what method is actually going to get executed because of multiple dispatch. I to
by sundarurfriend 4y ago
> I’ve read some Julia source and its an awful experience trying to figure out what method is actually going to get executed because of multiple dispatch.
I totally get where you're coming from, as this is how I felt when I started out exploring Julia code. In previous languages, I preferred to use the simple tools I was familiar with (my editor and ack/ag/rg) to explore code, but that workflow was a frustrating no-go in Julia. The usual alternative in those languages was to change my entire coding experience with an IDE, or to accept some (slight) additional complexity with things like ctags. In Julia, neither of those is necessary, as the inbuilt tools like @which, @edit, methods(), and methodswith() do a good job of providing a non-intrusive, simple alternate set of tools. (Shoutout to the InteractiveCodeSearch.jl package too, which provides a nice interactive interface over these that sometimes comes in handy.)
Now, generated functions and @eval-ed functions, those are a bane of readability when you're new to the code. Thankfully, those are rare enough and usually in deep enough parts of the code that this does not pose a significant problem.
[1] https://github.com/tkf/InteractiveCodeSearch.jl/ https://github.com/tkf/InteractiveCodeSearch.jl/