I graduated in 1990 in Electrical Engineering and since then I have been in university, doing research in the field of DSP. To me programming is more a tool than a job.
It is at least 20 years since last time I coded in C++. Maybe something changed; nevertheless, let me summarize my memories about it in two short phrases
C++: an OOP giant with clay feet inherited from C
C++: the power, the simplicity, the elegance and the safety of an hand grenade without pin.
I still remember the somersault with twist that I had to do to define a friend function of a template class...
It has been a long time, but some of the things that I remembered that I did not like
C-style #include that physically (rather than logically) embeds the included file. This has as consequences
You must use the ugly #ifdef INCLUDED hack.
If you use a use namespace in an header file, you pollute the namespace of whoever includes you
Template syntax too compact and obscure. Friends of class templates.
Automatic template expansion. At the time it looked like something cool, but with time I grew suspicious of compilers that try to be too smart. I prefer to write one line more to be sure to avoid obscure bugs.
Syntax a bit stricter than C, but not enough. Type system quite weak with automatic casting, still better than the "convert everything to everything else" of JS or PHP, but still too permissive for my tastes.
t is at least 20 years since last time I coded in C++. Maybe something changed ...
Yeah, quite a lot. I respectfully submit that you learn modern C++ before commenting — unless you, for example, think comments about life in Italy under Mussolini's rule are still valid. Maybe something has changed in Italy since 1943?
I graduated in 1990 in Electrical Engineering and since then I have been in university, doing research in the field of DSP. To me programming is more a tool than a job.
Well, it was pretty clear that my remarks were about the old version.
Although I have some difficulties to imagine how many of the defects I remember can be solved in new releases. Usually languages add features with time and drawbacks due to some issues in the original design (in this case, inheritance from C, obscure template syntax, automatic casting, type system C-like, ...) are difficult to solve because of the need of back compatibility.
Anyway, now I am curious and maybe I'll give a look to the new version, although I do not anticipate I will move to it soon.
I am a father, I am a husband and simply great guy :)
Developing AREG cross-platform communication engine to automate real-time data transmission between connected Things. Please support at GitHub.
Location
Munich, Germany
Education
It was so many years ago that now plays no role :)
Work
Creator of https://github.com/aregtech/areg-sdk/ . This is for heart and the rest is for food :)
Oh, well... May I change the question?
It is at least 20 years since last time I coded in C++. Maybe something changed; nevertheless, let me summarize my memories about it in two short phrases
I still remember the somersault with twist that I had to do to define a friend function of a template class...
It has been a long time, but some of the things that I remembered that I did not like
#include
that physically (rather than logically) embeds the included file. This has as consequences#ifdef INCLUDED
hack.use namespace
in an header file, you pollute the namespace of whoever includes youYeah, quite a lot. I respectfully submit that you learn modern C++ before commenting — unless you, for example, think comments about life in Italy under Mussolini's rule are still valid. Maybe something has changed in Italy since 1943?
Well, it was pretty clear that my remarks were about the old version.
Although I have some difficulties to imagine how many of the defects I remember can be solved in new releases. Usually languages add features with time and drawbacks due to some issues in the original design (in this case, inheritance from C, obscure template syntax, automatic casting, type system C-like, ...) are difficult to solve because of the need of back compatibility.
Anyway, now I am curious and maybe I'll give a look to the new version, although I do not anticipate I will move to it soon.
"You must use the ugly #ifdef INCLUDED hack."
For this you have the non-standard "#pragma once", supported for most of modern compilers.
And really modern compilers don't even need that.
If you develop / deliver a library, you'd still better use old and nice
#ifndef
.