[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: share a stupid typo bug of me :(
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 3 Nov 2012 16:14:35 +0200
2012/11/3 Egor Skriptunoff <egor.skriptunoff@gmail.com>:
> On 11/3/12, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>>> string.part=string.sub
>>> string.grepl=string.gsub
>>> string.sub=nil
>>> string.gsub=nil
>>> print((("How hard is that?"):grepl("hard","easy")))
>> How easy is that?
>
> Dirk, it is OK until you have to share your sources with others.
> Do you really wanna Babel in Lua community? :-)
I don't think it's Babel if you put a few lines in standard Lua
in plain view at the top of your code. Personally I only do this:
string.append = string.insert
without nilling insert, but I can see that part and grepl amount
to exactly the same thing, so I will not blame anybody who defines
those names and uses them consistently.
> The benefits of language standardization should not be underestimated.
>
The standard library is only a library.
But yes, language standardization is precisely the reason why
the names sub and gsub should not be changed.