lua-users home
lua-l archive

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


On 15/01/2010 06:22, David Kastrup wrote:
Ignacio Burgueño<ignaciob@inconcertcc.com>  writes:

For me, __len has clear semantics. The length of something is
measurable in 'n' units, with 'n' being a number.

Disagree.  If I implement a table "naturals" with iterators that will
never stop, I can make __len return a specific value aleph0 that is not
a number.

This is a good example. I hadn't thought of stuff like this.


Virtualizing tables via metatables offers some possibilities where it
does not make sense to artificially add restrictions that serve no
purpose except adding restrictions.  Complicating the language in order
to be able to do less with it is a bad deal.
...
A restriction that is only there in order to incur penalties for program
and programmer, without inherent necessity, is one I can do without.

Agreed. This is completely reasonable.

Regards,
Ignacio