Live data from Hacker News

Deep C and C++ (2011)

slideshare.net

241–243 of 243 posts

Re: Deep C and C++ (2011)

#241
post #199

Earlier quoted context omitted.

It'll take a team of ten authors and a couple of decades to write something of that kind for C++. Though the language is full of horrors, I still quite enjoy C++ (esp. with C++11 and am looking forward to some C++14 features...)

I know at least one guy, who is on it. http://herbsutter.com/gotw/

Nice! Thanks for the link.

Re: Deep C and C++ (2011)

#242
post #25
post #4

Heh, and they didn't even get into the aliasing rules. In embedded software, life would be a lot easier if I could hit every engineer who wants to type-pun without a union in the head with the ISO standard. For this reason, a lot of compilers have options to not strictly enforce the aliasing rules [edit] Also C and C++ are both permitted to reorder structs, it's just that they don't because that's the easiest way to…

As mentioned by others, C does not allow reordering of members in structs. However, C++ does! §9.2.12 says: Nonstatic data members of a (non-union) class declared without an intervening access-specifier are allocated so that later members have higher addresses within a class object. The order of allocation of nonstatic data members separated by an access-specifier is unspecified (11.1) This means, that under a strict…

That's what I was thinking of. Thanks.

Re: Deep C and C++ (2011)

#243

This was good, but… Hermione (I'm sure that's her) rates her C++ knowledge at 4-5, and Stroustrup himself at 7!? Bullshit. Either they are poorly calibrated, or they are displaying false modesty. Sure, they probably still have plenty to learn about C++, but come on, Hermione is already at the top 97% in terms of language lawyering. Wanting to be stronger is good. Not realizing you're already quite strong is not so go…

What I still wonder about is where that 7/10 rating for Stroustrup comes from. I've seen it mentioned in some other posts on hackernews, but just with the remark "Stroustrup rated himself as 7/10 in an interview". I'd like to see the entire interview (or what other source it comes from), just to be sure it's not an out of context quote.
Post reply on HN