Software Engineering discussion

6 views
Code Complete > Unusual Data Types

Comments Showing 1-3 of 3 (3 new)    post a comment »
dateUp arrow    newest »

message 1: by [deleted user] (last edited Apr 13, 2011 07:07PM) (new)

This chapter could have been renamed "Why you shouldn't use pointer-based languages if you can avoid it". The plethora of defensive strategies for using pointers are impressive, but I cringe at the effort it would require to implement all the advice. It also reminds me of how much detail about C++ pointers and references that I have forgotten over the years.

I think that the material on global data is well done, and it makes the important point that depending on our definition of "global", it is all around us (i.e. a database). While it should be avoided, but it isn't always evil and sometimes it is necessary.

I also discovered a new term (at least new to me) for something I have seen many times: "tramp data". It is defined as data passed to a routine or class merely so that it can be passed to another routine or class. I see this in functional programming-based code all the time, because global data is not allowed (hence no side effects).


message 2: by Aleksander (new)

Aleksander Shtuk | 84 comments It was interesting to find data types that I use every day in Unusual Data Types chapter.


message 3: by Erik (new)

Erik | 165 comments Yes, pointers can take a while to master and don't seem to be an issue in most modern managed language.

I noticed there was one paragraph on the "sizeof" C++ feature. The size_t typedef and sizeof( ) were the two most common problems I found when porting legacy code from x32 to x64 recently.

I'm a little suprised they didn't discuss structure byte packing.


back to top