[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: metatables for strings?
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 6 May 2015 08:02:37 +0200
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.