Egil Möller:
>When I wrote sugar/I-expressions, I realized the need for having a list
>as the first item in another list, but that it was only used in let...
>It would be trivial to introduce a new macro  := that only allows one
>assignment, and has the form (:= (variable value) expression), which
> would result in the following I-expression for the above code:
> which is actually even ugglier!

Why not just define an ordinary macro "let1", of the form (let1 variable value 
expressions*)?  It would define a new variable, assign it value, and then run 
expressions with the variable in scope.

Then you can do this:

 let1 foo 1
   let1 bar (+4 5)
     * foo bar

With this, you don't need to add reader macros or any other weird stuff.  It 
_does_ march to the right, but slowly, and if you have a lot of them the 
"group" isn't bad.  I suspect that there are several other macros that, if 
defined, would make I-expressions even nicer to work with.

A better name than "let1" would be great.

--- David A. Wheeler

Reply via email to