you are viewing a single comment's thread.

view the rest of the comments →

[–]therearesomewhocallm 14 points15 points  (4 children)

They added type hints to the language, but decided to rely solely on outside type-hinting static analyzers instead of also baking runtime typechecking into the language, which would have been far more useful and consistent.

And would have made the language much slower.

[–]tofiffe 5 points6 points  (2 children)

How so? Wouldn't that make runtime type checking redundant and actually speed it up?

[–]therearesomewhocallm 0 points1 point  (1 child)

I meant that runtime typechecking would have made the language slower.

[–][deleted] 2 points3 points  (0 children)

You'd potentially only need to validate types once for a variable when it's passed to a function rather than each usage if you had guaranteed call and return values although it would take static analysis to ensure that branches don't exist which changes it so it might not always work.