Re:To learn a new language, read its standard library
by hello4353 on Monday October 25, 2021 @08:32AM
(#28987034)
C++ blurs the line b/w language and standard library in some cases. Example initializer list.
Re:To learn a new language, read its standard library
by Jeff_Brown on Monday October 25, 2021 @10:25AM
(#28988152)
The advice still stands in a generalized form: read the "nearest to standard" libraries for that language that were implemented in that language.
Not too long ago it was impossible to implement std::vector in standard C++, as constructing objects next to each other formally did not create an array. Therefore pointer arithmetic on the resulting pointers were undefined behavior, as pointer arithmetic is only defined within an array.
This was fixed by the array being implicitly created in certain circumstances.