4 ms·
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 li
by aliceryhl 6y ago
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.
- adgjlsfhk1 6y agoTechnically 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 https://github.com/aviatesk/JET.jl
- sgt101 6y agoAhhhh - you want a statically typed language. That's definitely not Julia, you're probably best off with Java there.
- aliceryhl 6y agoI'm well aware which languages are statically typed and which are not. I was answering your question: > Have I misunderstood what is meant by strong type checker?
- gugagore 6y ago> 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.