I'm coming from Tcl-world ...

Jens Axel Søgaard usenet at soegaard.net
Wed Aug 7 16:21:07 CEST 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).

(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 ...



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>)

Jens Axel Søgaard

More information about the Python-list mailing list