Re:Julia 1.6: what has changed since Julia 1.0?
by aliceryhl on Sunday February 14, 2021 @02:33PM
(#26135418)
What do you even mean? It doesn't even catch that an argument's type doesn't match on a function call with types specified. It also can't catch trivial stuff like misspelling a struct field on a variable of known type.
If you want to be called a "super strong" type checker, you really have to catch that kind of simple issue at compile-time, _not_ when I run the code.
Re:Julia 1.6: what has changed since Julia 1.0?
by adgjlsfhk1 on Sunday February 14, 2021 @03:18PM
(#26135850)
Technically it is catching the type error at compile time (but compile time is Just Ahead Of Time). If you want something that feels more like type checking in a statically compiled language, you should definitely check out https://github.com/aviatesk/JET.jl
Re:Julia 1.6: what has changed since Julia 1.0?
by gugagore on Sunday February 14, 2021 @09:44PM
(#26138485)
> It also can't catch trivial stuff like misspelling a struct field on a variable of known type.
The default definition is
`getproperty(x, f::Symbol) = getfield(x, f)`
and `getproperty` can be overridden for a type, so `foo.a` can succeed even if `getfield(foo, :a)` fails. (`getfield` cannot be overridden).
So it's not trivial to determine, given the the of `foo`, from the syntax `foo.a` whether that code errors.
I like julia because of the super powerful and super strong type checking. Have I misunderstood what is meant by strong type checker?