[vlc-devel] commit: New C++ binding for libvlc. ( R?mi Duraffort )

jpd at videolan.org jpd at videolan.org
Mon Jan 25 13:11:43 CET 2010


On Mon, Jan 25, 2010 at 12:58:18PM +0100, Pierre d'Herbemont wrote:
> On Jan 25, 2010, at 9:48, jpd at videolan.org wrote:
> >You don't even need a set prefix, overloading will take care of it:
> >
> >mtime_t MediaPlayer::time();
> >void MediaPlayer::time(mtime_t);
> 
> Please dont.

Why not? Why favour asymmetry?

This is C++ after all, you know, might as well use its features.


> >I also think that the wrapper classes should inline (much) more
> >methods; now they're convenient but add entirely avoidable call
> >overhead.
> 
> I dont think it's actually a good idea. You save nothing, and makes  
> headers unreadable. And it makes API even more a PITA.

Not true, and I disagree plus easily circumvented. And I disagree.

If you dislike wrapping libvlc in C++ classes that much there's no
point in having them at all. A better argument is called for.


Similarly, not throwing exceptions pretty much defeats the purpose of
this particular C++ binding. If you'd rather not use exceptions, there
is the libvlc C interface, trivially accessible from C++ already.





More information about the vlc-devel mailing list