On 26/05/13 15:44, H. S. Teoh wrote:
On Sun, May 26, 2013 at 01:27:55PM +1000, Peter Williams wrote:
On 26/05/13 11:59, Nick Sabalausky wrote:
[...]
Forget waiting for a huge improvement, I'd have been happy to
ditch C++ even for a small improvement. C++ is such a pain IMO that
using it has about as much inertia as ice skates on concrete.
I found shifting from C++ to C an improvement. (Yes, I learnt C++
before I learnt C.) I should mention that this was back in the mid
90s and C++ may have improved since then :-).
[...]
You're not the only one who felt that way. At my day job we also
"upgraded" from C++ back to C. I've often ranted about our horrific
experience with a hugely over-engineered C++ system that can literally
do *anything*... except that nobody understood how to use the thing. It
had dtors with side-effects that did useful work, for instance, and
there were so many levels of abstraction it was bordering on insanity.
Once I had to make a function call to said horrible code... it involved
going through 6 layers of abstraction, two of which were fwrite()ing
function arguments to a temporary file, then fork() and exec()ing an
auxilliary utility that fread() the arguments back, and *then*
dispatched them across an IPC link...
Makes debugging fun doesn't it? :-)
We're now back in C-land, and boy the code is much cleaner, and
*faster*, even though it's a lot harder to read and more tedious to
maintain.
Like I've said many times before, the only way I found coding in C++
tolerable was to use it as "C with classes". Trying to do real OO in C++
is an exercise in masochism. Even Java with its baroque verbosity and
Amen to that. One reason I've avoided Java is that I found the signal
to noise ratio in the source code VERY low and this made reading such
code to find the bit that actually did something difficult. I am (or
was), however, a fan of the Java Virtual Machine (JVM) because it offers
"run anywhere" functionality.
prolific boilerplates beats C++ hands-down in this respect. And don't
even mention templates, which are already nasty enough to work with in
simple generic types; they are utter monstrosities when you start
getting into CTFE and compile-time codegen. D templates, CTFE, and
mixins, by contrast, are actually *pleasant* to work with.
I agree. Although I'm still learning D I'm finding it a pleasure with a
very high signal to noise ratio in source code. Plus most features just
work like one wishes the would.
Peter