merits of Lisp vs Python

Jon Harrop jon at ffconsultancy.com
Tue Dec 12 11:18:18 EST 2006


André Thieme wrote:
>> Contrast the much more common
>> 
>>   a[i] = b[n]
>> 
>> with
>> 
>>   (setf (aref a i) (aref b n))
>> 
>> and the attractions of Python may make more sense.
> 
> Here Python and Lisp are equal, 7 tokens vs 7 tokens, but in Python
> one has to write less since "[]" are 2 chars while "aref" are 4, plus
> the setf.

Why are you not counting Lisp's superfluous parentheses but you are counting
the brackets in the Python? I get 9 tokens for Python vs 13 for Lisp.

> But from counting the brain units which I regard as an important factor
> they are both equal.

Python is clearly more succinct in this case. I also think it is worth
counting chars or LOC as well as tokens. Lisp has unnecessarily long
built-in tokens...

-- 
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/index.html?usenet



More information about the Python-list mailing list