[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'regex-quote'
From: |
Bruno Haible |
Subject: |
Re: new module 'regex-quote' |
Date: |
Mon, 20 Sep 2010 20:21:22 +0200 |
User-agent: |
KMail/1.9.9 |
Eric,
> rather than adding a new flag bit, what about providing
> regex_quote_anchored as a wrapper that provides the anchors, so that the
> end user can choose between the one-liners of regex_quote or
> regex_quote_anchored?
It's the same argumentation: It's already easy enough to do this in C, with
1 to 5 straightforward lines of code.
When you provide an API, where to stop? When an API provides two similar
functionalities, where one can be coded using the other and 1-5 extra lines of
code, one of them is redundant.
- Once we have memcpy, is it worth having strcpy and stpcpy? Normally no. But
there are so many uses of memcpy that adding strcpy and stpcpy was worthwhile.
- Once we have strpbrk, is it worth having strcspn? I would say no. strcspn is
only there because it predates strpbrk.
- Once we have regex_quote, regex_quote_anchored is redundant.
The drawback of a large API is that it's harder to keep in memory.
Bruno
- Re: Plain text matching with regex: RE_PLAIN, (continued)
- Re: Plain text matching with regex: RE_PLAIN, Eric Blake, 2010/09/14
- Re: Plain text matching with regex: RE_PLAIN, Reuben Thomas, 2010/09/14
- Re: Plain text matching with regex: RE_PLAIN, Bruno Haible, 2010/09/14
- Re: Plain text matching with regex: RE_PLAIN, Reuben Thomas, 2010/09/17
- Re: new module 'regex-quote', Bruno Haible, 2010/09/18
- Re: new module 'regex-quote', Reuben Thomas, 2010/09/18
- Re: new module 'regex-quote', Reuben Thomas, 2010/09/20
- Re: new module 'regex-quote', Eric Blake, 2010/09/20
- Re: new module 'regex-quote', Bruno Haible, 2010/09/20
- Re: new module 'regex-quote', Eric Blake, 2010/09/20
- Re: new module 'regex-quote',
Bruno Haible <=
- Re: new module 'regex-quote', Bruce Korb, 2010/09/20
- Re: new module 'regex-quote', Reuben Thomas, 2010/09/20
- Re: new module 'regex-quote', Bruno Haible, 2010/09/20
- Re: new module 'regex-quote', Reuben Thomas, 2010/09/21
- Re: new module 'regex-quote', Bruno Haible, 2010/09/25
- Re: new module 'regex-quote', Reuben Thomas, 2010/09/29
- Re: new module 'regex-quote', Bruno Haible, 2010/09/25
- Re: new module 'regex-quote', Reuben Thomas, 2010/09/29
- Re: Plain text matching with regex: RE_PLAIN, Reuben Thomas, 2010/09/19
- Re: Plain text matching with regex: RE_PLAIN, Bruno Haible, 2010/09/19