3 ms·
I wonder why most people defend this feature. The problem is not the annotation, you can do that in ML, too: Poly/ML 5.6 Release > 5 : int; val it = 5: i
by cv1010 8y ago
I wonder why most people defend this feature. The problem is not the annotation, you can do that in ML, too:
Poly/ML 5.6 Release
> 5 : int;
val it = 5: int
But you cannot just use 42 where a type is expected:
> 5 : 42;
poly: : error: <identifier> expected but 42 was found
Static Errors
It's pretty silly that Python did not develop an actual type system if annotations like that are supported.
- zimablue 8y agoIn the void of enforcing a speficic one, you allow people flexibility to do custom things. For instance linters not understanding type specificatins beyond a certain complexity but still using them in your code and some custom decorator to check them at run/dev time