Meaningless Drivel is fun!*
The moose likes C / C++ and the fly likes C++ without Fear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "C++ without Fear" Watch "C++ without Fear" New topic
Author

C++ without Fear

Sayth renshaw
Ranch Hand

Joined: Apr 17, 2011
Posts: 44
First I wanted to clarify the link to C++ without fear in the welcome to Brian took me to the Amazon page for the 2004 release.

I wanted to know whether the new book covered the recent changes to c++ and what Brian thought the most significant changes changes would be? http://www.pcworld.idg.com.au/article/381241/iso_finalizes_c_update/
Brian Overland
author
Ranch Hand

Joined: Sep 09, 2011
Posts: 36
Oh yeah -- it's t here in the book, so my advice is, buy the book!

To be honest, I must give you a longer answer here. I cover most of the C++0x spec, but it is very, very expensive... also, large parts of it were difficult to test, difficult to acquire a compiler for, and also about things still being changed.

What is most important depends on what you use it for. To me some of the most important new features of the spec are:

-- "long long int" type (64 bits usually), though that's long been supported by some compilers

-- ranged-based "for" which works like "for each" in Basic; it removes need to check boundry conditions yourself, and so is much less error prone, as well as convenient

-- subclasses inherit base-class constructors... a potentially huge change for object oriented programming, saving much work, potentially

-- strongly-typed enumerations... so that the "enum" keyword can be used to creating even stronger type declarations

-- user-defined constants... essentially you can define new "literal" formats for the compiler to recognize. This is a further step in enabling you to truly use classes like they were primitive types. You can make a literal like "3i" into an instance of an Imaginary number class, for example, so that "5+3i" denotes a complex number. (Cool.)

-- more consistent initialization rules

-- smart pointers, which implement garbage collection for you

These are just some of the features I felt really important.

I am sorry I did not get to lambda functions and multi-threading... but these I felt were outside the scope of the book, which was already getting too large. Lambda functions are extremely difficult to explain, by the way... it's like you're creating a function definition "on the fly" without ever calling it in the normal way. Personally, I find it incredibly difficult to explain why this is useful, although there are some very advanced programmers who want it.

== Brian Overland
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: C++ without Fear