[MPlayer-dev-eng] c++ version of mplayer.c

Gábor Lénárt lgb at lgb.hu
Thu Feb 10 11:00:39 CET 2005


On Thu, Feb 10, 2005 at 10:46:15AM +0100, Attila Kinali wrote:
> Moin,
> 
> On Thu, 10 Feb 2005 10:28:57 +0100
> Moritz Bunkus <moritz at bunkus.org> wrote:
> 
> > > (have C++ coders ever heard about Turing for example? you can do
> > > everything in C too, hey)
> > 
> > Then why not code everything in Assembly? Or do a "cat > mplayer" and
> > enter opcodes by hand. It's about chosing the right tool for the
> > job. For MPlayer, C++ isn't the right tool, but for a lot of other cases
> > it is (or C is at least a major inconvenience).
> 
> I wouldn't say C++ is the wrong tool for MPlayer. We are already
> doing quite a lot of object oriented programming within MPlayer
> (just think about all the [av][of] modules).

There is nothing to say that object oriented stuffs can only be implemented
in C++ ... See GTK for example. It's not the question that C++ is wrong
tool for mplayer or not. It's the quiestion that C is the wrong tool and
C++ would be better? It it's true, then yes: it worth to change to C++.
But if not, what's the problem?

> And no, it's not true that C++ has to be slower than C, it
> just depends on how well you are able to write C++ and

Yep, I've not written that C++ is slower than C either! But it also true
that you can't say that C++ is _FASTER_ than C. Or whatever. So if we're
talking about an EXISTING project which is _already_ written in C, then turn
the project into C++ is a process which requires very important advantages
to do that. Otherwise it simply does not worth. Just simple, no C++ flame
here. At least in this section of the mail ;-)

> how well you know what kind of code is produced.
> It's just that C programmers think it has to be slower because
> it does more.

I've not written such an opinion though either ...

> > > I think C++ people are somewhat snobbish, at least I see everywhere
> > > that that want to rewrite everything in C++ which works good in C for
> > > ages ...
> > 
> > And C coders are elitist in that they think that every language other
> > than C sucks big time. So what else is new?
> 
> Full ACK.

No. Don't get the idea. I've only said that there're several EXISTING project
like MPlayer, or Linux kernel, or whatever which is ALREADY written in
C, the developers of course know C (otherwise thet wouldn't have developed
it ;-), there was not problem with being C, so then WHAT the advantage to
change to C++? This energy requires to make this change can be used to
solve problems which are REAL problems. Of course if we're talking about
a just-born project, it can be OK to think about that 'starting to code
in C++ or C or XYZ?'

- Gábor




More information about the MPlayer-dev-eng mailing list