Python syntax in Lisp and Scheme

Brian Quinlan brian at sweetapp.com
Sat Oct 18 05:02:51 EDT 2003


Rayiner Hashem wrote:
> Are equally natural in their respective syntaxes. However, if you have
a
> short, simple function:
> 
> (defun foo (x) (+ x 2))
> 
> is still perfectly natural, while:
> 
> int foo(int x) { return x + 2; }
> 
> looks a little weird. Most people would write the above similarly to
the
> first example, which makes it much longer. Block-structured languages
in
> general tend to suffer from this problem.

But Python doesn't

def foo(x): return x + 2

Cheers,
Brian






More information about the Python-list mailing list