5 ms·
I kind of wish people would make more posts about c++ - idiomatic c++ today is totally different than the c++ knowledge i have from pre-2010. The fact that c++
by CraigJPerry 6y ago
I kind of wish people would make more posts about c++ - idiomatic c++ today is totally different than the c++ knowledge i have from pre-2010.
The fact that c++ has changed so much in the past 10 years - it’s possible to write completely type and resource safe code in c++ now - this passed me by until a year or two ago when i attended a Bjarne talk.
Also the c++ folks have written up a core guidelines doc (this was the main topic of that Bjarne talk), and it’s really good https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...
- pjmlp 6y agoThe problem is that there is even a counter movement to it, praising C with Classes kind of code, Orthodox C++.
- dgellow 6y agoYou may want to follow the C++ subreddit, people are actually writing quite a lot about modern C++, it's just difficult to find out articles because the C++ community is completely decentralized and has no official (or even semi-official) forum. People write on their own blog and it requires some work to discover and aggregate all that content. https://www.reddit.com/r/cpp/ https://www.reddit.com/r/cpp/ I also really enjoy listening to the CppCast podcast by Rob Irving and Jason Turner, it's a nice way to follow what is happening with the language: https://cppcast.com/ https://cppcast.com/.
- pjmlp 6y agoCppCast is great, most of the content is quite good and is a very good way for those of us that mostly work with other languages to still keep up with C++ progress.
- cbfields21 6y agoIt is strange that there's no official mailing list (except the defunct comp.lang.c++). I recently wondered where one could find new C++ software since there's no announce list at all.
- dgellow 6y agoThe German-speaking community has an unofficial forum: https://www.c-plusplus.net/forum/ https://www.c-plusplus.net/forum/
- bregma 6y agoThere is also no central authority other than a committee of decentralized interests that meet a couple of times a year to figure out how to keep their published document up to date. One of the tricks with C++ is that it isn't a product created ex cathedra by a single interest group with a focused purpose and provided for you like mother's milk; it's a generalized idea that emerged from a bazaar of interests and provided by a free market for whatever purpose you chose. It has evolved to fill a niche rather than be designed to reach a particular goal (eg. 'kill C++') or even designed to reach a vague goal ('fix all the problems with C'). There is no official mailing list because there is no official 'there' there. C++ is not an organization, or a corporation, or a guy in his mom's basement. It's an idea held (mostly somewhat) in common by a whole lot of people with otherwise no shared interests all over the world.
- dgellow 6y agoNitpick: I think that you meant "eg. 'kill C'" (Other than that, great comment!)
- yakubin 6y ago> it’s possible to write completely type and resource safe code in c++ now "It's possible" is a rather low bar. It's also "possible" in C. Is it easy though? I wouldn't say so. Not if you push lambdas over queues to be invoked in another thread, or in the same thread, but later. Not if you take references to elements of std::vector. Not if you use std::vector<bool>. Not if you use operator[] on std::vector/std::array without tweaking some macros, because C++ committee in 2021 is still not convinced that bounds-checking is a reasonable default. It's very easy on the other hand to write perfectly idiomatic "modern C++" which is memory-unsafe. Well... Easy if you figure out which one, among a dozen, is the right way™ to initialize a variable. (And then go and read code which initializes std::vector in all those different ways and try to guess which one does what.)
- rowanG077 6y agoIt's not that the comittee thinks bounds checking isn't a reasonable default. They can't change it because it will break existing code.
- gpderetta 6y agoIt will not break any valid program actually. I'm 97.5% sure that aborting or even throwing an exception on an out of bound vector::operator[] would be a fully conforming implementation. The fact is that most standard library implementations can already be easily configured to bound check, so there is little pressure to mandate this in the standard.
- yakubin 6y agoThe code, which would break, was already broken. Just in far worse ways than throwing exceptions: silent memory corruption. And there would be no backwards-compatibility breakage, since in cases, where it would throw, currently UB is triggered.
- andrewprock 6y agoThe existing code may be "broken" but it is making too much money to risk changing it for pedantic reasons.
- cratermoon 6y agoEven 10 years ago there were two main "flavors" of C++, the generally OOP style of the original language and the very non OOP[1] style using the STL. Even within that, different shops had different subsets of the language they were willing to use. See, for example, Lakos' book Large Scale C++ Developement. [1] Alexander Stepanov, of STL fame, hated everything OO and called it "gook". http://www.stlport.org/resources/StepanovUSA.html http://www.stlport.org/resources/StepanovUSA.html