Looks good, pushed. Thanks Peter! On 2017-06-14 22:14, Peter Bex wrote:
What should we do with ##sys#glob->regex? I think it's useful enough to expose to the user, which conveniently allows us to get rid of the ##sys# prefix too. But in which unit does it belong the most? Personally, I think file might make more sense, as it's strictly not an irregex procedure, and it belongs with "glob".On the other hand, it doesn't actually hit the file system; it's an abstract operation over data-structures only, without any side effects.
I think it should stay in irregex. Glob patterns are generally useful, and the procedure actually returns a regexp or SRE, so making it part of the library that deals with those data types makes sense to me. In fact, if we're going to expose it, I think it would be best to drop the flag that changes its return type and make the procedure *always* return an SRE. This is more flexible, matches the existing conversion procedures like "string->sre" nicely, and the other behaviour is just one `irregex` call away. Here's a patch that does this, let me know what you think. Cheers, Evan
signature.asc
Description: PGP signature
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
