3 ms·
It occurs to me that there are very different penalties for growing the standard library vs the language itself. Adding new things to the language (e.g. closur
by fouric 5y ago
It occurs to me that there are very different penalties for growing the standard library vs the language itself.
Adding new things to the language (e.g. closures, conditions, a borrow checker, first-class functions, immutable variables, multiple return values) results in the user having to keep more things in their head at once to use the language.
Adding new things to the standard library increases the size of the language distribution, but doesn't appear to increase cognitive load that much. The fact that CL has a `round` function doesn't really make programming in it any harder.
Adding syntactic sugar to the language can make it harder to read, and usually breaks backward-compatibility.
My impression is that most language "bloat" is in the standard library and syntactic sugar, not the language "core" - although I have little experience with C++. Any counter-impressions?
- tediousdemise 5y agoI think increasing the size of the standard libraries is the solution to avoiding core language bloat. C++ has mostly taken this approach. A bloated core language means that programmers now have a lot of baggage to deal with--particularly features that reduce performance. In my opinion, I do not think features that reduce performance should ever be added to a core language. The only features that should be added to a core language are ones that increase code readability and safety and reduce the amount of code you need to write to accomplish your goal. > Bjarne was resolute in preserving his fundamental goals … People were telling Bjarne that you should turn C++ into a fully object oriented language… make it automatically garbage collectable… make all the member functions virtual… eliminate global functions… in other words they wanted him to design Java. He listened politely to them and kept maintaining the fundamental integrity of the language. [0] [0] CppCon 2014: Bjarne Stroustrup "Make Simple Tasks Simple!" (https://youtu.be/nesCaocNjtQ?t=296 https://youtu.be/nesCaocNjtQ?t=296)