lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Nov 11, 2010 at 10:10 AM, Michael Wyman <michael@mwyman.com> wrote:
> While DeviceTag.value is a little more verbose, it's intent is clear. Alternatively you might create an explicit comparison method.

Yes, C++ overloading is great fun when you're learning the language,
but then you unlearn bad habits ;)  So I'm with Michael on this one.

What he suggests is that DeviceTag could be an object that supports an
equals() method, so that DeviceTag:equals 'Blender' is possible. That
method could be 'overloaded' at run-time by looking at the type of the
second argument.

steve d.