Source-Changes-D archive

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

Re: regnsub, regasub



In article <d99e6d0e-65f0-3430-3cb6-8371e9f0e0e7%gmx.com@localhost>,
Kamil Rytarowski  <n54%gmx.com@localhost> wrote:
>-=-=-=-=-=-
>-=-=-=-=-=-
>
>On 26.02.2018 21:33, Jaromír DoleÄ?ek wrote:
>> +1 to removal
>> 
>> 2018-02-26 18:51 GMT+01:00 <maya%netbsd.org@localhost>:
>>>
>>> Any chance we can remove this from libc before releasing 8.0?
>>> it has one user, and the implementation is very specific for a certain
>>> use-case.
>>>
>>> having a DIY one use case function in libc is actually harming the
>>> ability to upstream this, aside from the implementation choices.
>> 
>
>I'm not the proper address for this request.
>
>I personally find these functions useful, just the regex(3) API (or
>strings in general) is not something people like to do in C.
>
>I see no problem with a one-use-case function in libc, as long as it is
>well defined and generic enough. I would definitely use these functions
>when I will be doing sed(1)-like operations in C.
>
>There are no problems with reentrancy or threading in these functions so
>I see no flaws.

These functions are very simple, useful and belong with the regex code.
There are no real savings removing them; perhaps their API can be improved
though. They are also documented, and they follow prior art in sed(1)/regsub
awk(1)/gensub.

christos



Home | Main Index | Thread Index | Old Index