[racket] racket 5.4 syntax tweak wishlist

From: Erich Rast (erich at snafu.de)
Date: Mon Sep 10 05:58:21 EDT 2012

> > * Colon keywords -- Make symbols beginning with the colon character
> > read as keywords.
> 
> +1, but I suspect that some people really prefer the #: because it
> makes the fact that it's only syntax apparent?

Count me among them. The #: is more consistent and typing one more
character doesn't bother me.

> 
> > * Multiple-value LHS in "let" forms 

I agree with that one. Regarding this I also have a question. Sometimes
I just need one of multiple values, but this always bothers me somewhat.
Take for example

(let-values (([a b c] (values 1 2 3)))
  (computation-with a))

Are the spurious bindings to b and c optimized away if they aren't used?
Is this even possible in general?

If not, I'd like to see effective primitives like take-nth-value,
take-first, take-second, etc. which discard the other values for sure.
This would also open the door to some high-level optimizations, albeit
presumably quite complicated ones.


Best,

Erich

Posted on the users mailing list.