Earlier quoted context omitted.
Precisely. Also the instruction sets have been designed for compilers vs minimizing gate counts. Making it easier for compilers to schedule optimally - alot less weird and bizzare shit they have to deal with.
Well, we also have to thank C for the set back in optimizing compilers. Fran Allen. In Coders at Work (pp. 501-502): --- Begin Quote --- -Seibel-: When do you think was the last time that you programmed? -Allen-: Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem a…
Why I don't spend time with Modern C++ anymore
101–110 of 264 posts
Re: Why I don't spend time with Modern C++ anymore
#102There are two separate rants here that aren't delineated well. 1) C++ is too complicated, and therefore hard to reason about and slow to compile. We're going to argue about this forever, but you'll have to agree that the spec is very large and warty compared to other languages, and that C++ tends to take far longer to compile (this was already a problem a decade ago, it's not specific to "modern" C++). 2) The future…
Can't really argue about 1. About 2, in-order single instruction execution hasn't been an assumption for a very long time; c and c++ optimizers (and programmers) have been able to take advantage of these CPU features for a while. There are language extensions (Cilk++, OpenMP), to take advantage of extra cores for fine grained parallelism. Regarding GPUs, arguably C and C++ have the most mature and transparent offload…
Any kind of performant multithreaded work today has to treat their motherboard as such unless they want significant performance hits.
Re: Why I don't spend time with Modern C++ anymore
#103I know why I don't like C++ anymore, it's just no fun.Its slow to compile, the errors are like 6 lines long full of template and class hierarchy that makes it hard to understand what exactly happened, and then of course there's the common coding shortcut of declaring everything auto. (What type is this list? I don't know, it's auto all the way down.) Then there's the whole thing about making constructors, but leaving…
I've added a few of those talks I've watched and liked to a small playlist (with a couple of other talks on programming, unrelated - the relevant talks are prefixed with "cppcon 2015"):
https://www.youtube.com/playlist?list=PLHvt7sld3hmvdDnwHkdU2...
The full cppcon playlist is here: https://www.youtube.com/playlist?list=PLHTh1InhhwT75gykhs7pq...
Of special relevance is the rather excellent talk by Kate Gregory on "Stop Teaching C" (when you're supposed to do an intro course to C++):
"CppCon 2015: Kate Gregory “Stop Teaching C"": https://www.youtube.com/watch?v=YnWhqhNdYyk
(But again, I want an open wiki/live tutorial, along the lines of "How I start", but longer, which goes through all this stuff. We really should make one, both for C++14 and for C11).
CppCon 2015: Herb Sutter "Writing Good C++14... By Default": https://www.youtube.com/watch?v=hEx5DNLWGgA Is also rather uplifting, and:
CppCon 2015: Sean Parent "Better Code: Data Structures": https://www.youtube.com/watch?v=sWgDk-o-6ZE
makes a pretty good case for simple, modern C++ being clear, easy and efficient.
Finally,
CppCon 2015: Phil Nash “Test Driven C++ with Catch”: https://www.youtube.com/watch?v=gdzP3pAC6UI
apart for being a pretty straight forward intro to a simple testing framework, appears to reveal some secrets combining template magic and still get sane compile times (hint: don't recompile more (template) code on every iteration than you need to).
There's a couple of good ones that touch on meta-programming too (Look for the talk on Spirit X3 and Brigand), and there's a nice lightning talk on clang-tidy (magically go from explicit loops to modern foreach, yay!).
Re: Why I don't spend time with Modern C++ anymore
#104Re: Why I don't spend time with Modern C++ anymore
#105Earlier quoted context omitted.
Precisely. Also the instruction sets have been designed for compilers vs minimizing gate counts. Making it easier for compilers to schedule optimally - alot less weird and bizzare shit they have to deal with.
Well, we also have to thank C for the set back in optimizing compilers. Fran Allen. In Coders at Work (pp. 501-502): --- Begin Quote --- -Seibel-: When do you think was the last time that you programmed? -Allen-: Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem a…
The assertion that compilers weren't taught any more is just silly.
Re: Why I don't spend time with Modern C++ anymore
#106If he is complaining about C++ being bad and suggesting Verilog on FPGAs as an alternative, boy do I have some bad news for him. HDLs (yes including Systemverilog) have 10x worse design than the worst software languages. This is why there are entire companies out there that make high level synthesis tools or high level HDL specification languages (like Bluespec). And I haven't even said anything about the quality of…
Re: Why I don't spend time with Modern C++ anymore
#107Earlier quoted context omitted.
> A single language needed to solve all problems is a fallacy. Has that been proven and do we have pointers to any peer reviewed papers on that? Because else its just an old's wives tale. I don't see any logical impossibilities for one language to solve all problems (meaning, to work well for at least 4 domains: OS and drivers a la C, apps/games a la C++, network programming a la Go, Java etc, and scripting a la Pyth…
It's just cultural, monetary, design and community issues "What difficulties does this proposal face?" "All of them"
Re: Why I don't spend time with Modern C++ anymore
#108Re: Why I don't spend time with Modern C++ anymore
#109This article is not very general. Much of what it tries to convince us is not going to matter for most developers, and has the cost of suggesting modern features are not good for any developers. For example: >It is not rare to see Modern C++ applications taking 10 minutes to compile. With traditional C++, this number is counted in low seconds for a simple change. This is simply a bogus statement with respect to what…
(re 10 minute compile times) > This is simply a bogus statement I work on a C++ project and believe me, 10 minute compile times would be great :)
Re: Why I don't spend time with Modern C++ anymore
#110I recently had to switch a project to -std=c++11 because a header I include now uses C++11 files. This change alone made compilation at least twice if not three times as slow. The new safety and convenience features are nice but compile times seem to be out of focus and getting slower and slower every year. I don't know how I feel with g++ 6.1 defaulting to -std=gnu++14.