11 ms·
Utilize strong type system to make the error case unrepresentable. This is great advice to reduce bugs in software in general. It takes more time to think about
by WiSaGaN 2y ago
Utilize strong type system to make the error case unrepresentable. This is great advice to reduce bugs in software in general. It takes more time to think about the problem and to make a design following this. However, a lot of times it is worth the time.
- Smaug123 2y agoI'm going to make the bold claim that it doesn't take more time to do this, if your language supports algebraic data types. It just sort of naturally happens. Of course, if your language requires a great deal of ceremony (C++, Java, C#, Python, Golang, Javascript, …) to model data, then it will take more time.