On Friday, May 3, 2013, Neil Toronto wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/03/2013 09:12 AM, Eli Barzilay wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A few minutes ago, Robby Findler wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Given that we don't yet even have a prototype of racket2, I'm going<br>
to guess that "near" isn't all that near. IMO, there are other big<br>
things that we should be focused on going first (notably the package<br>
system).<br>
</blockquote>
<br>
+1, since the "damage" would be that people will need to convert uses<br>
`match', but that'll be minor compared to `cond'.<br>
</blockquote>
<br>
+1, same reasons.<br>
<br>
When I don't use match for a while, the first time I use it, I almost always write [else ...] as the last clause. Then I catch myself and replace `else' with `_'.<br>
<br>
I started being careful about catch-all cases in `match' when I wrote an expression similar to this:<br>
<br>
(match a<br>
[(list x) #t]<br>
[else (case (first a)<br>
[(6) #f]<br>
[else #t])])<br>
<br>
got this error:<br>
<br>
case: bad syntax (not a datum sequence) in: else<br>
<br>
and was completely baffled for a long time.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A few minutes ago, J. Ian Johnson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've used else as a catch-all binding in match. Yes, it's not the<br>
best practice, but I think since I've done it, other people must<br>
have done it too. This could annoy them.<br>
</blockquote>
<br>
Do you have an actual use that would *break*? That is, something like<br>
<br>
(match x ... [else else])<br>
</blockquote>
<br>
I'll bet almost every use of just `else' as a pattern in the wild doesn't have `else' in the body because it's intended to be a catch-all case. If it does have `else' in the body, it's almost certainly in a `cond' or a `case', which is either an error or hideous style.<br>
<br></blockquote><div><br></div>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; things broke when #f was an argument)<br>
<div><br></div><div>Robby</div>