3 ms·
The "strong type systems" work by having you design the types correctly in the first place. If designed correctly they work wonders, and 90+% of the time if the
by hnfong 3y ago
The "strong type systems" work by having you design the types correctly in the first place. If designed correctly they work wonders, and 90+% of the time if the code compiles it's probably correct. That's a big "if" though, and most of your time writing "strong type systems" is coming up with the correct type structure.
The one thing worse than debugging code is debugging "types". Those 30-page C++ compiler errors are definitely worse than whatever I had to do with (for example) Python.
- raincole 3y ago> Those 30-page C++ compiler errors are definitely worse than whatever I had to do with (for example) Python. Everyone complains how slowly Rust compiles. But at least its error messages are much better.
- lmm 3y ago> Those 30-page C++ compiler errors are definitely worse than whatever I had to do with (for example) Python. That's definitely in the "programming language sucks" category. Good languages make it easy to debug problems with your types.
- Hirrolot 3y ago> The "strong type systems" work by having you design the types correctly in the first place. I was responding to a comment that was suggesting letting an AI to do that. > The one thing worse than debugging code is debugging "types". It depends on a language. In languages with first-class types, we have the same tools to debug types. Classical C++ templates are more akin to a macro system than a type system.
- mikebenfield 3y ago> Those 30-page C++ compiler errors are definitely worse than whatever I had to do with (for example) Python. C++ is sort of the canonical example of a language with a terrible type system, so it's not really the right place to look for this comparison.