lua-users home
lua-l archive

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

On Wed, 2006-18-01 at 11:19 +0000, Lisa Parratt wrote:
> I'm always a fan of enforcing polite coding behaviour in the language.  ;)

This is great for many uses, but totally kills the utility of the 
function for proxy objects.

What if my userdata is a proxy for an external vector, and therefore 
wants to present itself to Lua code as a table? With a simple __typeof 
metamethod, it can simply return "table". With your proposed "forced 
politeness", it's back to patching out idiot proofing before someone who 
understands and accepts the consequences of their actions can use Lua to 
it's full.
Wouldn't a table holding your userdata do the same thing?  Return type "table" I mean?

Michael T. Richter
MSN:,; YIM: michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:

Attachment: signature.asc
Description: This is a digitally signed message part