[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LET-VALUES concerns

This page is part of the web mail archives of SRFI 11 from before July 7th, 2015. The new archives for SRFI 11 contain all messages, not just those from before July 7th, 2015.

I'm a bit concerned about the syntax of LET-VALUES:

   (LET-VALUES (<formals> <expression>) <body>)
          <Formals> should be a formal arguments list as for a LAMBDA  
          expression, cf section 4.1.4 of the R5RS.

This means 

(let-values (a <expression a single value> )

will bind A to a list containing the single value.  I believe this
will likely be a common mistake producing an unexpected result.

MzScheme's LET-VALUES requires <formals> to be parenthesized.

I personally think that, since (VALUES X) is equivalent to X, a single
name A should be equivalent to (A) in that position.

I would also like to see LET-VALUES allow more bindings to be
consistent with LET.  (Unfortunately, this pretty much requires there
being LET*-VALUES and LETREC-VALUES as well, again as in MzScheme.)

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla