Hacker News new | ask | show | jobs
by olah_1 1988 days ago
The real bummer about optional typing is that it doesn’t speed up the program. I used it all over thinking that I was “optimizing” or helping the compiler. Really I was creating more work for it.
2 comments

The goal is definitely that it can enable greater optimisation and I agree that it's not a reality yet. The other benefit is that it constrains types so that you get compile time type checking, which is very useful.
typing, roles/inheritance and multi dispatch together offer a very clean coding model that cuts through the usual if-then-else wool