lua-users home
lua-l archive

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


On Tue, Jan 12, 2016 at 9:19 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2016-01-11 23:42 GMT+02:00 Matthew Wild <mwild1@gmail.com>:
>
>>> OK. But what are the chances of this being added to stock Lua in the
>>> next version?
>>
>> Based on the number of patches enthusiastically posted to this list,
>> and the number that ever get in - I'd say the answer is "very low".
>
> Jonathan's suggestion is merely a change to a library, not
> to core Lua. In such a case, there is an alternative route to
> respectability: contribute a module to LuaRocks. Let's say that
> the module 'jgstring' returns a function that monkey-patches
> the string library, saving the original functions in string.orig.
>
> Once that is installed, it is a matter of
>
>    require"jgstring"()
>

I would prefer if that module returned new function string.match
without changing any globals.


-- 


Best regards,
Boris Nagaev