Today I wrote my first program in Julia (solution for Advent of Code 15)!
A problem I immediately hit is function discovery. E.g. if have an object x, what can I do with it? In many other languages I type x. and the IDE helpfully autocompletes the list of things I can do with it. Not so in Julia (I’m using VS Code with the Julia plugin btw).
Perhaps Julia could benefit from some syntax sugar similar to Rust, where x.f(args..) is equivalent to f(x, args...)?
Alternatively, if |> did currying, then x |> f(args...) could trigger the autocompletion instead. What do you think?
Rust also does multiple dispatch, even more powerful than Julia because it also dispatches on the return type. Uniform Call Syntax is still very useful in that scenario.
Still, there seems to be enough opposition to UCS that I guess it won’t get adopted in Julia. This is a bit surprising given Julia already has sugar for treating the first argument specially when it’s a function (do ... end), so it’s not like the language is completely opposed to useful sugar.
Guess I’ll wait until editor plugins adopt ?("hello") autocompletion or until the |> currying comes along.