On Mon, Sep 10, 2012 at 9:52 AM, Neil Van Dyke <n...@neilvandyke.org> wrote:
> Two syntax tweaks I'd like to see in Racket 5.4: > > * Colon keywords -- Make symbols beginning with the colon character read > as keywords. Possibly also make keywords print as starting with colon > rather than pound-colon. I know some people don't mind "#:", but I don't > like typing it or looking at it. I think "#:" also looks gratuitously > different/cumbersome to people coming from Lisps, and unnecessarily cryptic > to people just coming from anywhere else. > +1, but I suspect that some people really prefer the #: because it makes the fact that it's only syntax apparent? > * Multiple-value LHS in "let" forms -- In the "let"* forms (i.e., "let", > "let*", "letrec"), in addition to permitting the LHS of a binding to be an > identifier, also permit LHS to specify multiple idents for multiple-value > binding. Two motivations: (1) "let-values" and friends are painfully long > for something as basic as a binding form, and increase rightward drift; and > (2) when editing code to change an existing use of a single-values "let"* > form to add a multiple-values to it, having a multiple-values LHS doesn't > require adding a bunch of extra parens to the existing single-values. > Syntax-wise, I would be equally happy with any of the three alternatives > for multiple-value LHS: "(values ID ...+)", or drop the keyword to have > just "(ID ...+)". or even drop the parens so LHS syntax is simply "ID ...+". > I'd something like that too, although if you can write (let ([(a b c) (values 1 2 3)]) ....), then you may infer that you can write (define (a b c) (values 1 2 3)), which is wrong. Yet, you can't write (let ([(f x) (+ x 1)]) (f 3)), so let is already different from define. Laurent
____________________ Racket Users list: http://lists.racket-lang.org/users