Hacker News new | past | comments | ask | show | jobs | submit login

> That is not different from static typing. It is just that the enforcement happens at runtime.

Isn't the inherent problem with dynamically typed languages exactly that they do not enforce types at compile time nor runtime? Like you try to call a method of an object that does not exist, and it crashes the runtime.

Moreover, I'm not sure I get your example. Wouldn't that be just a matter of a union type + parametric pattern matching in a statically typed functional language? You would just get exhaustiveness checks and type safety on top of that for free.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: