Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Matthew Flatt
At Fri, 3 May 2013 17:29:52 -0400, Eli Barzilay wrote: > A few minutes ago, Robby Findler wrote: > > > > FWIW, this was the bug in redex that prompted me to send this > > message (it was there for some time since it wasn't a syntax error > > it was similar in spirit to the code I posted; thin

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Robby Findler
On Sat, May 4, 2013 at 9:07 AM, Matthew Flatt wrote: > At Fri, 3 May 2013 17:29:52 -0400, Eli Barzilay wrote: > > A few minutes ago, Robby Findler wrote: > > > > > > FWIW, this was the bug in redex that prompted me to send this > > > message (it was there for some time since it wasn't a syntax er

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Matthew Flatt
At Sat, 4 May 2013 09:15:22 -0500, Robby Findler wrote: > On Sat, May 4, 2013 at 9:07 AM, Matthew Flatt wrote: > > > At Fri, 3 May 2013 17:29:52 -0400, Eli Barzilay wrote: > > > A few minutes ago, Robby Findler wrote: > > > > > > > > FWIW, this was the bug in redex that prompted me to send this >

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Laurent
Matthew, Out of curiosity, could you explain why you'd prefer #:else everywhere instead of [else ...] ? Would such an #:else allow for multi-line bodies? On Sat, May 4, 2013 at 5:06 PM, Matthew Flatt wrote: > At Sat, 4 May 2013 09:15:22 -0500, Robby Findler wrote: > > On Sat, May 4, 2013 at 9:0

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Robby Findler
Okay, makes sense. Lets leave it alone. Robby On Sat, May 4, 2013 at 10:06 AM, Matthew Flatt wrote: > At Sat, 4 May 2013 09:15:22 -0500, Robby Findler wrote: > > On Sat, May 4, 2013 at 9:07 AM, Matthew Flatt > wrote: > > > > > At Fri, 3 May 2013 17:29:52 -0400, Eli Barzilay wrote: > > > > A f

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Laurent
(that was assuming Ryan's assertion that "[...]Matthew say that he would have used a keyword for `else` in `cond` if he had it to do over again", which seem to mean that even in Racket2 Matthew would prefer `#:else' over `[else ...]' ?) On Sat, May 4, 2013 at 5:14 PM, Laurent wrote: > Matthew,

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Robby Findler
I think the bad property is the shadowing of the "else" identifier and Matthew's point is that one way to avoid that is to not use an identifier at all. The racket2 wiki currently says "try this out" so I guess it isn't something people believe will definitely be better, but something to explore.

[racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Jon Zeppieri
Since incompatible future changes seem to be coming up a lot, I thought I'd add one more. What do the members of this list think of removing eqv? all of its associated machinery (e.g., memv, hasheqv, etc.)? (Along with this change, it would be nice if characters could all be immediately represente

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Robby Findler
I'm curious: why do you want all characters to be eq? to each other instead of just equal?? Robby On Sat, May 4, 2013 at 10:57 AM, Jon Zeppieri wrote: > Since incompatible future changes seem to be coming up a lot, I > thought I'd add one more. What do the members of this list think of > remov

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Jon Zeppieri
Just for performance. No other reason. -Jon On Sat, May 4, 2013 at 12:01 PM, Robby Findler wrote: > I'm curious: why do you want all characters to be eq? to each other instead > of just equal?? > > Robby > > > On Sat, May 4, 2013 at 10:57 AM, Jon Zeppieri wrote: >> >> Since incompatible future

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Jon Zeppieri
Something about my response below has been bothering me, and I think I know what it is: the correspondence between characters and the fixnums that represent their code points seems -- how to put it? -- more complete if it extends to their equality predicates. So, yeah, in addition to performance

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Robby Findler
Well, I'm not sure that I buy that motivation, since I think decisions about what should be eq? to what should be driven by performance (and eq? should only be used for performance) but lets put that aside. There are some unused bits in Racket's runtime representation of values, namely when a valu

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Asumu Takikawa
On 2013-05-04 10:36:14 -0500, Robby Findler wrote: >The racket2 wiki currently says "try this out" so I guess it isn't >something people believe will definitely be better, but something to >explore. FWIW, Clojure uses keywords for `else` so there is some experience there: http://cloj

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Eli Barzilay
Three hours ago, Jon Zeppieri wrote: > Since incompatible future changes seem to be coming up a lot, I > thought I'd add one more. What do the members of this list think of > removing eqv? all of its associated machinery (e.g., memv, hasheqv, > etc.)? +1, but unrelated to performance or whatever:

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread John Gateley
Personal opinion: performance is a dangerous motivator. Yes, it is a necessity, but it is often abused as a reason to do something. There's a semantic difference between eq? and equal? from the point of view of mutability. Two objects are eq? if modifying one also modifies the other. They are equ

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Eric Dobson
The mutability argument does not hold in Racket. non eq? things can be mutated and affect each other using chaperones and impersonators. On Sat, May 4, 2013 at 5:27 PM, John Gateley wrote: > Personal opinion: performance is a dangerous motivator. Yes, it is > a necessity, but it is often abused a

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread John Gateley
From the docs: >>> An impersonator is a wrapper for a value where the wrapper redirects some of the value’s operations. Impersonators apply only to procedures, structures for which an accessor or mutator is available, structure types, hash tables, vectors, boxes, and prompt tags. An impersonat

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Robby Findler
On Sat, May 4, 2013 at 8:17 PM, John Gateley wrote: > From the docs: > > >>> > An impersonator is a wrapper for a value where the wrapper redirects some > of the value’s operations. Impersonators apply only to procedures, > structures for which an accessor or mutator is available, structure types

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Greg Hendershott
I think this is a great idea. When I learned Scheme a few years ago, the prospect of juggling three kinds of equality was a surprise. I felt like Kevin Kline's character in A Fish Called Wanda, who kept asking, "What was the middle one?" It turned out only two have really mattered practically, f

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread John Gateley
On 5/4/2013 8:26 PM, Robby Findler wrote: But chars are not mutable so the rule "mutate one and change the other" doesn't apply. So they might be eq? or might not. Similarly with numbers. In the case of numbers with the current Racket, if you have an exact integer that is close enough to zero,

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Jon Zeppieri
On Sat, May 4, 2013 at 9:46 PM, John Gateley wrote: > > > On 5/4/2013 8:26 PM, Robby Findler wrote: >> Some characters have the equal? implies eq? property (the ASCII ones and >> maybe a few more, I'm not sure) and some don't (#\λ for example). > > > Excellent point, and now I understand your effi

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Greg Hendershott
There will be people who see the long BNF for match in the Reference, and flee to the Guide to try to learn by example instead. Even when they later do read the Reference carefully, they'll be left with first impressions of idioms from the Guide. (I might be one of those people. Cough.) The Guide

Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Robby Findler
On Sat, May 4, 2013 at 9:04 PM, Jon Zeppieri wrote: > On Sat, May 4, 2013 at 9:46 PM, John Gateley wrote: > > > > > > On 5/4/2013 8:26 PM, Robby Findler wrote: > >> Some characters have the equal? implies eq? property (the ASCII ones and > >> maybe a few more, I'm not sure) and some don't (#\λ f

Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Robby Findler
Oh, right! Thanks! I'll push something that explicitly mentions underscore and adjust the elses to use underscores. Robby On Sat, May 4, 2013 at 9:09 PM, Greg Hendershott wrote: > There will be people who see the long BNF for match in the Reference, > and flee to the Guide to try to learn by ex