lua-users home
lua-l archive

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


On Wed, May 6, 2015 at 12:36 AM, Rena <hyperhacker@gmail.com> wrote:
> It seems like what OP really wants is objects that act as special
> types of strings, which is already doable with a table containing a
> string.

This has been called the 'virtualization' problem:
http://lua-users.org/wiki/LuaVirtualization

Basically, how well can an object mimic a string?

Personally, I wouldn't design that way. Even in languages where one
can inherit from a string class, it isn't considered a good practice.