Re:JuliaLang: The Ingredients for a Composable Programming L...
by throwaway894345 on Monday February 10, 2020 @07:34PM
(#22294920)
You're describing optional type systems; in this regard, Julia is on par with Python or TypeScript. The linter you're describing is also a type checker (like Python's Mypy). That said, it would be really interesting if someone would make a type checker that would evaluate/resolve those more complex types, at least those that can be guaranteed to terminate.
Re:JuliaLang: The Ingredients for a Composable Programming L...
by socialdemocrat on Tuesday February 11, 2020 @03:47AM
(#22297030)
Optional typing and what Julia does is quite different. Julia type system is nothing like Python or TypeScript.
In Julia type annotations are not just a sprinkle of sugar. It has a very concrete use beyond asserting type consistency.
Julia types are used to decide what code gets run and memory layout of data.
I can add a type annotation in Julia which is a function call which returns a type e.g. This function can be of any complexity.
I think a better approach is simply a Linter. You report type problems you can find and ignore the rest. Not point trying to figure out the more advance Julia cases.
I would assume 90% of Julia code will use types in a pretty straightforward manner and thus would be able to be analyzed by some sort of Linter. Lint.jl e.g.