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!