3 ms·
I think he was advertising this as a feature. Failing to compile is much better than hitting your "this can't happen" conditional at runtime.
by jrockway 17y ago
I think he was advertising this as a feature. Failing to compile is much better than hitting your "this can't happen" conditional at runtime.
- scott_s 17y agoYou're right, I didn't understand his intentions.
- wlievens 17y agoAbsolutely. One of the advantages of static typing (NOT starting a type war here, oh gods) is that you can transform error conditions from the run-time to the compile-time world. Earlier failure = cheaper failure, so this is great. I try to take this as far as I can. For instance, when writing Servlet code in Java, I define all my request parameter names in an enum, so that I can never misspell any lest the compiler tell me.