lua-users home
lua-l archive

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

David Given wrote:

On Monday 06 December 2004 18:04, Brian Weed wrote:
Raffaele Salmaso wrote:
The nice thing is that I've removed the ':' syntatic sugar, now you
must use only the '.' operator.
Speeking of the colon, does anyone here have a patch for Lua that
actually does allow the dot to be used in place of the colon for

I'm not entirely sure what you mean here; do you mean you want to be able to call methods using . (as in Raffaele's OO system)?
Yes. I have objects bound from C++, and I would prefer to use a dot to derefence them instead of the colon. And, I am open to modifying Lua to do it... I am looking for C code that understands the difference between a library of functions, and an object with methods, but handles the difference transparently so that a dot can be used in both cases. Perhaps this can't be done if it is the parser that is doing the sugar magic, and the object is not known at parse time. I don't know. I was just wondering if other people have done this?