Re:What else are we getting wrong about programming languages?
by stcredzero on Sunday October 30, 2016 @06:34PM
(#12832860)
Gradual typing is awesome, though relatively hard to implement.
It doesn't have to be any harder than a language with a JIT VM. See Strongtalk and Dart.
At one point you do have to make a decision though. If you come from a static type system, the compiler rejects programs if it can't proof their type correctness. Dynamic languages that introduce statics types typically do it the other way 'round: in case of doubt, allow the program at compile time, and possibly throw a type exception at run time.
Also wrong. See Strongtalk and Dart. If you wanted to, you could make a variant of either system not compile your app without every type specified.
Re:What else are we getting wrong about programming languages?
by sharpercoder on Sunday October 30, 2016 @06:37PM
(#12832877)
Also see PHP, C# (dynamic and object), TypeScript.
At one point you do have to make a decision though. If you come from a static type system, the compiler rejects programs if it can't proof their type correctness. Dynamic languages that introduce statics types typically do it the other way 'round: in case of doubt, allow the program at compile time, and possibly throw a type exception at run time.
You can try to make separate decisions in separate scopes, but then you have problems at the boundaries between such regions.
The point I'm trying to make is that gradual typing comes with its own complexity, both on the implementation side and through cognitive load for the programmer.