3 ms·
It's weird how opposite the core language and the std library of C++ are, and even more so in the recent revisions! The core language seems to go for being as c
by Aardwolf 8y ago
It's weird how opposite the core language and the std library of C++ are, and even more so in the recent revisions! The core language seems to go for being as code-golfy as possible, while the std library goes for super-verbose without any convenient shortcuts
The core language adds ascii character notations optimized for brevity.
The library instead makes things that should require 1 argument take 2 or 3 arguments (which ranges will hopefully fix), makes value to string conversions as verbose as possible, etc...
- bluGill 8y agoThe core language is much harder to work with than the library, thus the difference. The library can be posted as code and thus we can test it thoroughly, and discuss it based on a real implementation. Contrast that to the language. It isn't code, it is standardize. It is written by and for lawyers in the negative sense of the word lawyers. Anything you do in the core language is hard because there are too many ways to accidentally (or intentionally) slip something evil past everybody. C++ takes backward compatibility seriously. If I didn't have a 20 year old code base of working code to deal with I'd be working in Rust, D, Go, Java, C#, or whatever the language of the day is. (Note that because of the amount of users and time C++ often has better optimization, but if that fraction of a percent better matters you can invest in optimizer work for your chosen language and solve the problem)