Live data from Hacker News

Deep C and C++ (2011)

slideshare.net

31–40 of 243 posts

Re: Deep C and C++ (2011)

#31
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 good.

Re: Deep C and C++ (2011)

#32
post #19
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…

> Also C and C++ are both permitted to reorder structs, it's just that they don't because that's the easiest way to follow the standard. Is that feasible? Doing so would require that the order of the member addresses not correspond to their layout in memory.

As long as the code is fully visible and compiled by the same compiler, then yes.

Re: Deep C and C++ (2011)

#34
Erm, sure some things are about knowlegde and having more skilled people are better. However, who the fuck would begin to talk about different standards on the simple program at the beginning?

It is all about the question, and the question was asked in a poor way making the candidate unsure on what you want to know and will most probably have a simple answer. I personally hate questions like that because it's stupid to ask them. The point of asking a question is to get as a good answer as possible. Then, please don't ask vague questions and be waiting for the long, detailed answer.

Re: Deep C and C++ (2011)

#35
A college student in CS here. I'm always impressed by people with deep understanding of programming language internals and try to pick up as much about programming language internal workings and compilers as I can. How does one get really good at this? Is it by spending a lot of time programming and building stuff? Is it by reading books/blogs/articles about programming languages? Any recommendations for such resources?

Re: Deep C and C++ (2011)

#36
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…

"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."

Is that the same standard that says it is illegal to write to one entry and read from another in a union* ?

* Note : special situation of identical fields in a structure

Re: Deep C and C++ (2011)

#37
Knowledge of the language is a big factor, but it's far from being the only one. How fast one is able to create things is an example of another important factor. There are many more.

Re: Deep C and C++ (2011)

#38
I only know python well and am looking for another language to learn. C was on the shortlist, but after this, crikey. At least I now know it's not going to be an easy ride.

Re: Deep C and C++ (2011)

#39

A college student in CS here. I'm always impressed by people with deep understanding of programming language internals and try to pick up as much about programming language internal workings and compilers as I can. How does one get really good at this? Is it by spending a lot of time programming and building stuff? Is it by reading books/blogs/articles about programming languages? Any recommendations for such resourc…

One way is as you said is by spending a lot of time programming and building stuff.

The slide deck says, the only way is the experience. You need to read and learn endlessly over the years.

Like you I hope there was one book, that does this. Makes a nice idea for a community project. Compiling such massive wisdom into a book can't be done by a person alone.

Currently its a bit like alchemy, looks very little chemistry and much more magic. And to learn there are hardly any resources beyond your regular C books, which more or less keep talking of the same things.

Post reply on HN