|
|
|
|
|
by bjourne
2497 days ago
|
|
Sure, but then you lose soundness. That is, it becomes possible to fool the compiler into thinking, say, a string is a fixnum, leading to crashes. It becomes equivalent to the optional typing of mypy which also is easy too fool because it doesn't insert any type checks. def oh():
return 'hi'
x: int = oh()
x + 3
It type checks fine but contains a type error. |
|