On Wed, 19 Jul 2000, Moshe Zadka wrote:

first gilad wrote:

> > Qt indeed uses C++ but AFAIK not very well. No templates, no STL and
> > little use of things like multiple inheritance . Now I can hear all you
> > hard core C programers saying to yourselves: "why, you sayit like it's
> > a bad thing?!" but I think that if someone is using C++, at least she
> > should do it well.

note when qt was written - compilers support for standard C++ was
horrible
(partially cause the standard was not final yet and kept changing). even
today some "features" of the language are not supported by some compilers,
or not supported _well_ on some compilers.

and then moshe battled back:

> I disagree. Indeed, one of my todo projects is rewriting Python in highly
> conservative C++ (no templates, no exception, multiple inheritance only
> when all but one of the classes are ABCs, etc.) to show that conservative
> C++ can kick C's ass. OTOH, when a project is done in C++,  you can be
> sure there will be no corner of the reference manual of C++ will be left
> unexpoited.

i'll have to back you up on this one. we're using c++ at work for a
fairly large project (i think it passed the line of 1M source code
lines and few K classes quite a while back).  the project was done
(read - controlled) by two different teams. one which uses every
template possible with the compiler, and one that rarely uses
templates. the difference in generaetd code size and compilation
time is quite dramatic. under the limitations you've mentioned,
indeed i found that using c++ is quite more productive then using c source
code. 

we also started up with using exceptions, but after a while realized their
evilness, and stopped using them (except for already existing code).

as for using "interface classes" (in the manner you described - it proved
quite useful for isolating code and making compilation much faster, but it
has two drawbacks - impact on speed (that's usually very small and
irrelevant) and impact on re-compilation - unlike languages such as java
(or probably python which isn't even compiled) - when such an abstract
interface class is changed (e.g. a new method is added) all classes that
depend on it _must_ be recompiled or they start invoking wrong virtual
functions when others are called. with non-virtual methods this does not
happen, and thus the test cycle could be made faster. with a small project
it won't be noticeable. with a large project - this will be very
noticeable.

> > a. Free C++ compilers that support all of the features of the language
> > did not exists and a big gap existed between the support that existed on
> > various platform. This has changed by now, though.
> 
> I take it you think g++ supports templates properly? Think again. 
> (I've worked with g++ and templates. I wouldn't wish it on my enemies)

when have you tested this last? someone i know said he managed to compile
and use roguewave's class libraries (which are using templates liberaly)
on a linux system using gcc 2.95 (or it is egcs 2.95?) about 6-12 month
back, and it worked quite well.

> > Gilad, who fell asleep 3 times in five minutes while trying to read
> > "Design Patterns" ;-)
> 
> Are you kidding? I read that book cover to cover. Wonderful book!

thought i believe design patterns in general are a bit over-rated.

guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to