[racket-dev] [plt] Push #24363: master branch updated

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Mon Feb 27 17:13:30 EST 2012

At Mon, 27 Feb 2012 16:39:33 -0500,
Eli Barzilay wrote:
> Is there really a need for an N+1 way to do this?

This is a common idiom, and there was no way to make it as convenient
as it should be. Yes, it's easily implementable in terms of
`build-list' or `in-range' but having to roll your own every time
doesn't feel right to me. srfi/1's `iota' comes close, but its name
and argument order being different than `in-lists''s make it less
nice IMO.

> Did you check if there's any code that this breaks?

I suspect that most programs will get that binding through #lang
racket, in which case it can be shadowed. raco setup didn't catch
anything. DrDr is running, so we'll see if it finds anything wrong.

> If it stays, then I'd prefer a version that is more directly
> implemented in terms of `in-range' (let it determine defaults),

I can fix that. I didn't write it that way to avoid duplication of the
error handling logic. If you have a solution to that, I'm interested.

> and a
> description that similarly builds directly on `in-range' (as the
> comment in the code says).

I can add a note at the end. I still want the entry to be
understandable independently of `in-range'.

Vincent

Posted on the dev mailing list.