Tomas Volf <[email protected]> writes: > Noé Lopez via "Development of GNU Guix and the GNU System distribution." > <[email protected]> writes: > >> Gabriel Wicki <[email protected]> writes: >> >>> Hi Noé! >>> >>> Thank you for the initiative! Not sure what >>> >>>> make each regex only have to match once >>> >>> means but I don't have to know until the review! Thanks for requesting >>> that from me in advance ;) >>> >> >> Haha yeah the wording is not very clear. I mean in the case that you >> have multiple files, each regex may not match in every file. >> >> Think an example like this (thanks Jason Conroy): >> (substitute* (find-files "." "[.]py$") >> (("bad thing") "good thing")) >> >> In this specific case, its fine if some files don’t have “bad >> thing”. But the default will still be to make an error. > > So if I understand it right you mean "have to match *at least* once"? > Sounds reasonable. > > Though I admit I am somewhat curious how far we could get by always > mandating all matches, and packages could just use replace-in-file (to > use Ludovic's name bike shedding) twice. I am sure there is *some* > package where it would result in convoluted code, but if it works fine > in vast majority of cases, maybe the forced strictness would be > better?
Yes, and that is what I have done (must always match), because otherwise its too hard for me to implement. > Dunno. > > Tomas > > -- > There are only two hard things in Computer Science: > cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
