cppcon 2017
Cppcon 2017
Other urls found in this thread:
koblents.com
twitter.com
...
...
...
Still unreadable resolutions.
Still unreadable resolutions.
I've never met a black C++ programmer.
For systems programming, use Rust.
For applications, use Dart (with Flutter, once they port it to Linux PCs).
Python is acceptable for scripting only. Shells should only be used for real time commands, not scripting.
Please repeat this in any language related thread so that it sinks in to people's brains and they see the truth.
Why would anyone use C++ instead of C. If your going to use C++ you might as well use C#, Python, Rust, or Visual Basic.
...
Nah, I'd rather use C++
This is actually a good point, its best to make your code readable
It's a lot of dueling info as template argument deduction is firmly into 'overly clever'. When you've got things deriving from std::false_type and unreadable spew gaming C++'s templates like typedef std::enable_if::type, you've gone too far.
OMG concepts are almost here! And they're almost going to kick the compiler's ass! Take that compiler, lemme see how you spew 2 pages of template errors now!
I've used C instead of C++ and it was bad. Even with fancy C99 stuff like designated initializers and compound literals, C was still worse than C++, why?
Because working with strings was still a PITA. Because releasing resources in case of error, without doing GOTO, was still a PITA. Because the standard library doesn't help you by NOT giving you containers such as unordered_map (admittedly it's up to you to write the best optimized data structures for your current app but it's a PITA if you fuck it up -- which you will).
Why don't you use goto? Is there something wrong with it or did you just hear it was bad and decide to never use it?
Not
My personal trouble with goto is that you have to really pay attention to not have code executed which shouldn't have been executed (look at systemd source code and the "goto fail" bugs).
At first, when I'm creating a function, that's rather easy, but I usually fuck it up when I add some code "just to fix something" some weeks later.
...
I have no problem using the mini-GOTOs break, continue and return. But the "real" goto changes the flow of the code in a way that the others don't. Suddenly there's a label for you to search for to determine which statements get executed and which don't -- at the same level. If you don't consider this a problem, good for you, but I don't envy the people maintaining your code.
You know, I'm old enough to remember when conferences like this weren't inundated with bulldyke degenerates and brown affirmative action hires.
Sigh.
Tell us more gramps! Did you use to wear ties like Dilbert? Did you stop beating your wife because she didn't spend enough hours in the kitchen that day? I'm just kidding fam.
What's your point? "if" statements do this too. goto is just skipping over code in another way. The Linux source code has tons of goto's in it and seem to have a good rationale: koblents.com
How does it require more attention than other keywords? The problem with "goto fail" was that they didn't review it or have a style guideline about putting brackets around the if statement. Its a symptom of that, not the inherent cause of the bug.
Wait for Dart 2.0, it changes the language in important ways.