Re: Feature request: plain option for gsub
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Feature request: plain option for gsub
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2014年8月22日 09:31:19 +0200
2014年08月22日 6:42 GMT+02:00 Tom N Harris <telliamed@whoopdedo.org>:
> Although it is well established that a plain option to gsub is not strictly
> necessary, I don't think I've heard a compelling reason not to have it.
>
> Pro: Avoid the overhead of pattern matching. Will be backward-compatible.
>
> Con: Adds to code maintenance. Can be trivially emulated. May only be modestly
> faster than find/sub.
Another con is that it would be a fifth parameter, preceded by one that
is usually nil. No standard library routine in Lua 5.2 has that many
non-vararg parameters.