At 23:29 on 01/02/2001 EST, "Drew Northup" <[EMAIL PROTECTED]> wrote:
> The only problems I can see caused by sticking solely to C are the
> following:
> 1)C memory management sucks big slimy moose crap,
C++'s is no different. Certainly destructors are a convenience, but
they're implementable in C as well, as long as you stick to certain coding
standards.
> 2)no optimized rb_tree (etc) STL functions,
There are plenty of C algorithms and data structures on the net :)
> 3)printf--(yuck--I don't think we use this much anyway though),
> 4)scanf--ditto,
Wha? printf and friends are extremely useful and powerful. I use them
all the time in C++ as well.. "<<" is fine for printing out classes, but
for printing out simple strings and numbers, printf is just SOOO much
easier IMHO..
> 5)globals--need I say more? (result of lack of classes--though we could do
> some weird struct stuff to supplant this if we wanted to........),
How do classes and globals have anything to do with each other? I must be
missing something.
> 6)lack of instances (due to lack of classes)--could be a problem handling
> some devices.
All a class is is a group of functions which all take the same struct as
their first argument, coupled with a constructor and destructor.
This can be done in C as easily as in C++.
Don't get me wrong- I'm coding mostly in C++ these days because I find
certain features (inheritance, compiler support for constructor/destructor
concepts, etc) useful. But either language is equally capable IMHO. The
choice of language is really up to the project leads and I think we should
try to honor it for those cases where it makes sense to do so.
For some parts of the system (the UI in particular), a language with more
native OO support would probably make sense though. Inheritance is a pain
in C (though not impossible, of course)
But for the guts of the system, let's keep it as tight as possible and in
whatever language the guts-coders are most comfortable with :)
--Josh
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> > Of Ramon van Handel
> > Sent: Tuesday, January 02, 2001 9:19 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [plex86] Happy PERFORMANCE
> >
> >
> > On Tue, 2 Jan 2001 [EMAIL PROTECTED] wrote:
> > > By the way, the write-cache wouldn't compile on FreeBSD. I
> > don't have the
> > > error here (I'm at work), but I can supply it if anyone is
> > interested. If
> > > it's changing to C anyway, it probably won't matter.
> >
> > I don't know, that's just my opinion...
> > However, I had a brief look at the code and it doesn't look too difficult
> > to change it to C. I don't quite see the big issue here... (by all means
> > use C++ for prototyping if you like, I just don't like it in the codebase
> > :)).
> >
> > -- Ramon
> >
> >
> >
>
>