lua-users home
lua-l archive

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


On Wed, Nov 24, 2010 at 12:10 PM, James Rhodes
<jrhodes@roket-enterprises.com> wrote:
> With regards to your last note about accessing characters through s[i], you
> can actually already do this by setting the metatable for all strings; like

OK, so the question would be: how much does this slow down regular
method dispatch like s:sub(i,i)?

I'm ambivalent about 'global subclassing' because it can be very cool
for small programs but doesn't play nice with other people's code
(especially if they have decided to override the string metatable for
their own purposes ;))

steve d.