ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Deep C Fishing

(1/2) > >>

Jibz:
http://www.slideshare.net/olvemaudal/deep-c

Some excellent stuff in those slides if you are interested in C/C++ :Thmbsup:

f0dder:
(page 226) "Suppose you want to change a value crossing a word boundary, you would need to read two words, mask out the value, change the value, mask and write back two words." ... not really precise enough for little miss precise, is it now? That really depends on the CPU you're compiling for - and if we take for instance x86, where you don't need the masking stuff instruction-set wise, the hardware would be dealing with cache and not just two words :)

Eóin:

:mad: Oh she annoys me so much... but some of that might be because she has pointed out stuff I missed.

f0dder:
:mad: Oh she annoys me so much... but some of that might be because she has pointed out stuff I missed.-Eóin (October 10, 2011, 01:50 PM)
--- End quote ---
:P - I'm a bit more than halfway now, and she hasn't brought something up I didn't knew (but I do admit I'm rusty on the finer points of sequencing points) - on the other hand, I wouldn't have answered simple questions with such detail.

I reeeeeally like the slide below - it's pretty true in my experience.
SpoilerDeep C Fishing

EDIT: man, at page 350, flipping to the next page is unbearably slow in FireFox... 5+ seconds, with one CPU core pegged at 100% all the time. In IE9 it's consistently sluggish all the way through, but the rendering is messed up. WebApps, gotta love 'em.

mwb1100:
That's a pretty nice explanation of some topics that are difficult to teach. But, I have some comments/nit-picks (I think nit-picks are valid, since the slide deck mostly seems to be about being precise with the behavior and semantics of the language).

On page 24:
a declaration `int f();` says there is a function `f` that takes any number of arguments.

--- End quote ---

Might be more accurately:

a declaration `int f();` says there is a function `f` that takes an unspecified number of arguments. The caller is required to make sure the function is called with the correct number and type of arguments.

--- End quote ---


Page 243:

They use the `auto` keyword in its pre-C++11 incarnation!  I don't think I've ever seen it used outside of some old, old textbooks.  In fact, given its overall uselessness and that the keyword has been repurposed in C++11, I think the old use of the `auto` keyword should be stricken from tutorials, except perhaps to explain that you shouldn't ever use it.

Page 245:

I wish they identified which compiler gives a warning about using an uninitialized variable only in an optimized build - that seems to be a poor behavior for a compiler. I'm not saying this doesn't happen, but I'd like to be aware of where it does.

Page 255:

I wish they provided a reference for Stroustrup's self-assessment.  Just out of interest and in case anyone ever asks for my self-assessment, then I could provide some context.




Navigation

[0] Message Index

[#] Next page

Go to full version