Re: C++ Passion = Madness
On 05/17/2010 12:53 AM, Razvan Cojocaru wrote:
Given that many other programming languages are easier to learn/use, is
my passion for C++ a form of madness? No idea why, but I enjoy challenge
of scope resolution, templates, memory management, and all the other
things that cause newcomers to C++ such confusion.
I couldn't give you a relevant answer, since I don't know you
personally. There are a few potential explanations, some of them
flattering and some of them not so flattering :). I'll be a good netizen
and skip to the flattering ones: it's possible that you've got a high IQ
and get easily bored with simpler languages, or you've considered the
other languages and found that C++ covers pretty much everything.
C++'s template metaprogramming makes Lisp easy to learn, C++'s OO
support makes Java easy to learn, C++ plain C support makes similar
programming languages (is Pascal still alive?) easy to learn, and so on.
Unless you're a trendy postmodern programmer and need to be at the
bleeding edge with the latest buzzword-filled academia-only programming
language designs, if you make the effort and really master C++, it's all
downhill from there if you need to learn any other real-world
programming language.
C++ is also an ISO standard and not owned by any one company, which
makes it a safer investment in your professional future. Nobody can kill
it, like Microsoft did with Visual Basic. If Microsoft shuts down all
Visual Studio development tomorrow, you'll still have GCC, Comeau,
Intel, and a bunch of other compilers.
How old are you? :)
Not sure about the high IQ bit, but IQ is a measure of a fairly
specific type of pattern recognition, so I'm not overly impressed by
high IQ scores. As for C++ being a useful skill, I find that most
vacancies require experience with boost, oracle, or other libraries, and
not just STL. Then, many of them require good academic results, and or
specific experience, although I've never been convinced that is any
guarantee of a good C++ developer, or the code they've developed or
develop be easy to maintain or develop. As I don't meet the previous 2
criteria, getting an opportunity to use any C++ skills I may have is not
easy. So those C++ skills have hardly flattered my career development.
Enough of my moaning, it's good to know other folks have responded to
the original post. Plenty of interesting observations about C++ have
arisen, and you're comment about other programming languages being
easier to learn if you're coming from C++ is certainly true based on my
experience.
One area that frequently seems to be ignored is code documentation,
which also ties in with Quality Assurance procedures, but in my
experience this is mostly shoddy at best. Surely, given the potential
difficulty of understanding C++ code this should receive more attention
than it often does. Personally, for my own projects I use DOxygen with
the associate code comments to create documentation. This helps to
understand the code during development, and especially if you, or others
ever need to do more development at a later date.
The other area that seems to be ignored is scope, which surprises me
as with objects going and out of scope, the relevant constructors and
destructors are called. This is implied code that any good C++ developer
will be aware of, but can still be a potential cause of nasty bugs.
Especially if the code has interdependencies between existing objects,
although I always try to encapsulate these within another object.
Finally I came across an instance where folks had developed code where
a member function would delete *this object, (delete this;). IMHO this
is appalling and have never done it myself. So, can anyone justify doing
this, as it is a potential time bomb for future development.
As for my age, well I finished my degree 20+ years ago should point
you in the general direction of my age.
Regards
JB :)
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]