I'm coming from Tcl-world ...
Jens Axel Søgaard
usenet at soegaard.net
Wed Aug 7 10:21:07 EDT 2002
Andreas Leitgeb wrote:
> Languages without sugar (such as lisp/scheme but also
> various assembler-langs as far as I know them) are really
> abhorrent for me.
Ahem. There are lots of syntac sugar in Scheme - you can even
introduce it your self by using syntactic macros (as opposed to
textual macros).
Examples:
(and) is sugar for #t (true)
(and <exp>) is sugar for <exp>
(and <exp1> <exp2>) is sugar for (if <exp1> <exp2>)
(and <exp1> <exp2> <exp3>) is sugar for
(and <exp1> (and <exp2> <exp3>)), which is sugar for ...
See:
http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.3
In some (mostly toy) implementations even
the sequence operator begin is sugar:
(begin <exp1> <exp2>) ; evaluate <exp1> then evaluate <exp2>
is sugar for
((lambda (dummy) <exp2>)
<exp1>)
--
Jens Axel Søgaard
More information about the Python-list
mailing list