lua-users home
lua-l archive

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


On Tue, Apr 15, 2014 at 10:51 PM, Tom N Harris <telliamed@whoopdedo.org> wrote:
On Monday, April 14, 2014 07:31:37 PM steve donovan wrote:
> Another idea that was floating around is that the metatable of
> strings, etc could be tied to the current environment.  Then a
> person could happily monkey-patch within their modules without any
> other code being bothered.

Or get rid of the metatable and tell everyone to use the `string` functions
directly.

Not a bad idea when you think about it. If it was so, I wouldn't be crying here about the issues at all, and would happily live with those constraints (string is a string, string is not a table), ;-). And there isn't one for numbers either (why string is such a special case, an array of chars?). But this change would break whole lot of code, so it is not worth it.