3 ms·
None taken, many great projects such as the Linux kernel are written in languages with near zero type safety, and their authors with tremendous experience conti
by _3u10 11y ago
None taken, many great projects such as the Linux kernel are written in languages with near zero type safety, and their authors with tremendous experience continue to this day to advocate the choice of languages with poor type safety over those with excellent type safety.
I think it's worth hearing Linus out on the reasons you might want to choose a less type safe language over a type safe one.
http://harmful.cat-v.org/software/c++/linus http://harmful.cat-v.org/software/c++/linus
- therockhead 11y agoLinus is talking about C++ which no ones considers safe.
- AnimalMuppet 11y agoIt can be used in ways that provide more type safety than C. (And people do - that's part of why not every C++ program is a crumbling ruin.) But people (including Linus) choose not to use that extra safety. They have their reasons, not all of which are stupid. Type safety is not the only good in a programming language.
- tempodox 11y agoOK, there's a difference here between “type correctness” (your binary NOT trying to apply a string function to a floating-point number, e.g.) and “type safety” (your language using formal methods to ensure type correctness). If you as the programmer are willing and able to ensure type correctness manually, the type safety of your language becomes close to irrelevant. It's just that not everyone is a kernel programmer who needs the extra oomph you get if you sacrifice type safety.