79 points · by ingve · 10y ago · 60 comments
That was me being cautious, see http://blogs.msdn.com/b/vcblog/archive/2015/04/29/c-11-14-17... - "I previously listed "Atomics in signal handlers" as No, because despite maintaining <atomic>'s implementation, I didn't know anything about signal handlers. James McNellis, our CRT maintainer, looked into this and determined that it has always worked, going back to our original implementation of <atomic> in 2012."
Also really excited for co-routines. I never liked using promises.
Wow, had no idea ranges and contracts are on the table too. With all this stuff, C# is really losing its appeal.
This is a big benefit of C# (and every other remotely popular language except C and C++; how C compares to C++ is a separate question.) Arguably, some systems cannot afford a garbage-collected language, but your comment kinda assumes you can choose between C# and C++.
Well, to be fair ISO Core C++ (mentioned in the blog post) with all safety profiles turned on is designed to fix this issue. I have my doubts about whether it'll actually succeed in still being C++ though, as it rules out so much valid modern code (and I also have doubts, or at least unanswered questions, about its soundness/expressiveness).
I'm sure the C++ community will gradually work to address the (huge!) security issues through heroic effort, but it's doubtful that anything meaningful can be achieved when "undefined behavior" remains an acceptable definition of the semantics of an operation.
EDIT: Don't get me wrong... I am in awe of the recent efforts of the C++ committee (and co.), and I hope they succeed in this endeavour!
Modern C++ is pretty nice if your team is ready to embrace it and leave old styles behind. I still use C# for utilities and prototypes but for production stuff, users' time is more valuable than mine.
And surely you'll agree with the GP that they're not really comparable.
So C# might lose its appeal to you specifically but not to many people ;)
> Single-quotation-mark as a digit separator
I have to admit to utter befuddlement about why you would ever want that. (Presumably they will also require scanf to honor this as well . . . that'll be fun).
Just when I thought the C++ committees were getting their heads screwed on straight. Am I missing something, or is this another trigraph disaster?
alias dfk='LC_NUMERIC=de_CH df --block-size=\'\''1024'
alias duk='LC_NUMERIC=de_CH du --block-size=\'\''1024'
that help me when something like du -h won't do.Also, the underscore is used to separate words in variable names, where it is significant.
int my_long_var_name, mylongvarname;
are different variables. But in numeric constants, the underscore has no meaning. 186_282.397 and 186282.397
would be the same number. This is inconsistent.Finally, in a variable width font, the single quote is much less visually intrusive than the underscore, which tends to be a wide character.
I would like to see this form used universally. In my wildest fantasies, I'd also allow either '.' or ',' as the decimal indicator. That would make some of my European friends happy.
100000000000000
100_000_000_000_000According to Wikipedia [1] underscore was proposed for C++ but rejected because it conflicts with user-defined literals.
Is there any reason they could not have used space? Offhand, I can't think of anyplace where a space in a literal number would not currently be illegal, so adding that as a separator should not introduce any problems, but C++ has grown massively in complexity since I last seriously used it so I could easily have overlooked something.
[1] https://en.m.wikipedia.org/wiki/Integer_literal#Digit_separa...
(Or, rather, as ((uint64_t)100 * 1000 * 1000 * 1000 * 1000), but you'll need to do something to prevent overflow in most languages, anyway.)
"""
The note was written for committee members, but “escaped into the wild.” Here are a few comments from the web:
• http://www.reddit.com/r/programming/comments/33us7z/what_wil... up_on_c17_goals/
• http://forums.theregister.co.uk/forum/1/2015/04/27/c_daddy_b... ections_for_v17/#c_2500733
• https://news.ycombinator.com/item?id=9441245
As you see, people outside the committee also have strong opinions. Those opinions can depart radically from the ones I hear in the committee and from reality.
"""
I'd definitely recommend CPPCast (http://cppcast.com/) for learning about the C++ community.
Pluralsight has some decent videos as well.
It's a website that looks like a C++ dev made it.
Still big in medical devices too, embedded or not.