[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] add regexp-split
From: |
Eli Barzilay |
Subject: |
Re: [PATCH] add regexp-split |
Date: |
Fri, 30 Dec 2011 21:32:17 -0500 |
40 minutes ago, Daniel Hartwig wrote:
>
> How about having an optional argument to control the behaviour? The
> default could be to not include the groups, thus mimicking the
> output of Guile's `string-split' and `regexp-split' in other
> Schemes.
That can work, though I personally prefer a separate name. (But
obviously, my personal taste has zero weight for guile...)
> If two procedures are implemented they will be almost verbatim copies
> of each other.
Yeah, but that's not an argument in favor or against -- since you can
switch between:
(define (foo x [other-behavior? #f]) ...code..)
and
(define (foo-internal x other-behavior?) ...same code...)
(define (foo x) (foo-internal x #f))
(define (foo-other x) (foo-internal x #t))
where the internal function is not exported from the library.
> No comment on Perl's handling.
>
> I think Racket does the right thing by keeping *all* the empty
> strings in place.
Well, I do think that Perl (as well as other libraries & languages)
are a good reference point to compare against... If anything, you
should at least be aware of other design choices and why you went in a
different direction. (And we did not follow perl in all aspects, as
those tests clarify.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
- Re: [PATCH] add regexp-split, (continued)
Re: [PATCH] add regexp-split, Marijn, 2011/12/30
- Re: [PATCH] add regexp-split, Nala Ginrut, 2011/12/30
- Re: [PATCH] add regexp-split, Marijn, 2011/12/30
- Re: [PATCH] add regexp-split, Nala Ginrut, 2011/12/30
- Re: [PATCH] add regexp-split, Marijn, 2011/12/30
- Re: [PATCH] add regexp-split, Daniel Hartwig, 2011/12/30
- Re: [PATCH] add regexp-split, Daniel Hartwig, 2011/12/30
- Re: [PATCH] add regexp-split,
Eli Barzilay <=
- Re: [PATCH] add regexp-split, Daniel Hartwig, 2011/12/30
- Re: [PATCH] add regexp-split, Eli Barzilay, 2011/12/30
- Re: [PATCH] add regexp-split, Daniel Hartwig, 2011/12/30
- Re: [PATCH] add regexp-split, Eli Barzilay, 2011/12/31
Re: [PATCH] add regexp-split, Neil Jerram, 2011/12/30
Re: [PATCH] add regexp-split, Daniel Hartwig, 2011/12/30