I’m totally new to Julia, but have some Rust, Zig and Python background.
I am using the Julia Language Server with VSCode. Even for type-stable functions, vscode does not show the return type of functions. And variables which are the results of functional calls, those types are not inferred either, even for type stable functions. (even for simple functions like from Example.jl)
hello(who::String) = "Hello, $who"
I have read in the manual this passage:
Return type declarations are rarely used in Julia: in general, you should instead write “type-stable” functions in which Julia’s compiler can automatically infer the return type. Functions · The Julia Language
So if writing type-stable functions are the best practice, shouldn’t the Language Server provide some information about variable types, and function return types? It’s quite surprising, having used the Language Server implementations for other languages, including Python.
That would be nice, but limited to functions with only one possible input (or output) type (like that of the example). And those are not very common. In general type stability and return types are properties of the funcion and of the input types together.