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

jpd at videolan.org jpd at videolan.org
Mon Jan 25 15:49:45 CET 2010

On Mon, Jan 25, 2010 at 03:25:41PM +0100, Hugo Beauzee-Luyssen wrote:
> To avoid having a type* instance(); method and a type* m_instance
> member in every class that binds a libvlc type, i'd recommand you to
> use a template parent class such as this one :
> http://www.vlmc.org/repositories/entry/vlmc/src/LibVLCpp/VLCpp.hpp
> The cast operator may be a bit much, though it's quite handy as it
> prevents you to have to call instance() in most cases.

I thought this was about wrappers that are supposed to handle exactly
that sort of thing and aren't supposed to export their internal
instances, so why you'd mechanise something they're not supposed to do
is something you'd perhaps best eludiate upon.

One of the things you can do very well in C++ is obviating the need
for exactly the kind of asserts you're adding there wholesale.

Casting operators come with their own very special set of caveats.

> The last remark kinda break the thread chronology, but please, no,
> don't use overload to differenciate getters and setters.

Explain then, and with something better than this troll:

> The "let's use c++ features" argument is void, otherwise let's
> overload "operator ,". I'm sure it can be used somehow.

I suppose you'd prefer to argue "let's not use C++ features", which
frankly does not make sense for creating "C++ bindings".

Nice to see you recommending seriously tricky C++ features while at it.

More information about the vlc-devel mailing list