2006/03/11

So, what's with C++?

Is shifting from C to C++ supposed to be exciting? What changes?
Well, from nothing for some, to everything for some. And some fall in between.

A friend (Balsree) would program in a language he used to call (rightly!) C+. That's nothing but coding in C, with the freedom of getting to declare variables anywhere in the function, and using the C++ compiler to compile. C++ didn't particularly entice him, except for this thing.

And some tend to think - 'C++. Ok, I'll have classes, members and member functions ... encapsulation ... well-designed coupling/cohesion.' That was what I started off like.

And of course, all the new datatypes available with C++ seemed to be exciting too! The simplest and most interesting for beginners, I reckon, must be the string class. Maybe, cout/cerr are much simpler - but I didn't seem to be very keen on using them because I didn't realise their power immediately.

The STL had to wait. As a newbie, it's hard to even think about them. The syntax, to begin with, seemed so weird! 'Who in this world came up with such a syntax?'
So, my first C++ implementation of hypar was without any template code of my own. Some borrowed code, which seemed to work with my classes (and were needed for hashing) seemed to do the trick, was included.

Thus, started my tryst with C++. Even today, almost 5 years down the line, I seem to discover new things, and get scared at times of some syntax-constructs! (See boost source code.)

0 Comments:

Post a Comment

<< Home