#SAS dumps Amiga
16-Mar-95 08:33:55
Sb: #46167-#SAS dumps Amiga
Fm: Greg Comeau@Comeau Cmptg 72331,3421
To: Hani Yakan 73657,3025
>So I was not saying that C++ results in slower code than C because its
>C++, but because I have a better tool (C++) to aproach problems.
>…
>The results is more C++ code that C, not because its C++ but because I have
>now more functionality.
Thanks for your elaboration. _It is excellent_ and I do now have a better
understanding of your perspective. I think a point of difference, if I'm
understanding your correctly though, is:
>Using C, I would not have gone to all this extent.
Many would have. Although it is very true that:
>In C, I don't even have to write a library, just open the socket…
If I may, this can be equally true in C++ — and often is. (Yes, I know you
didn't say it wasn't). As well (and you didn't say this wasn't either,
but I'd like your thoughts on it) one _can_ take an OO approach in C.
In addition, some of this has nothing to do with OO at al.
Agreed C does not have as many "natural" features to support the
implementation of such designs "directly", and so
"might less force you to do so", but such forethought, etc, should always
be the concerns of any programmer. That is to say, although the language
"is just a tool", it does interfere with some of these things in part.
Equally though, especially earlier on, it should transcend them,
including to the point of being non-issues.
IOW, what I'm saying is that good design is good design.
That it might be easier (but I'd rather not even say that) for say a
C programmer to just "plop down and go" I think that was always just an
indication of a poor programmer (and I'm NOT talking about somebody who
spent X's of hours of forethought/prototyping/etc figuring it out in their
head first, _appearing_ to just be hacking).
And ok, for many, this is what the so-called "paradigm shift" is about
when moving from say C to C++ (and BTW, there _are_ more paradigm shifts
than the ones many realize when first going to C++). Once realized,
ignoring pragmatic, practical, legacy, etc issues, I believe there is
no reason to ignore those shifts/lessons/realities/awakenings because
it might be convenient to do so (whether even still in C++ or some other
language). These are the kinds of things that many C++ programmers mean
when they say that C++ made them better C programmers. Not only has it
helped them understand C better (for instance, syntactically) but it
has made them a better programmer in general. As this is all about
a creative, complex, cognitive, human thought process, I think it is
great even if they never use C++ again (I _don't_ want to single out C++
for the reason here, but it is in part an example, especially since it
is part of what we're talking about).