Why is Python popular, while Lisp and Scheme aren't?

Cameron Laird claird at lairds.com
Fri Nov 8 17:09:20 EST 2002


In article <20021108.135935.824272813.9010 at cybermesa.com>,
Jay O'Connor <joconnor at cybermesa.com> wrote:
			.
			.
			.
>No, I'm making the point that TCL is syntactically weaker at expressing
>complex structures and this is a qualitative difference between the two
>languages
>
>Expanding beyond just getting a single value from a multidimensional list
>is what happens when you start throwing in lrange for slicing and other
>ways of unwrapping the structure.  TCL's approach of using 'functionName
>$var1 var2' leads quite easily and naturally to such 'monstrosities' as a
>natural consequence of the stucture of the language.   When you start
>throwing in heterogenous structures, especially dealing with nested
>arrays (dictionaries) , etc..the syntactical shortcut doesn't scale very
>well to dealing with complex data.  (incidentally, your example does not
>do the same thing.
>
>set l1 "1 2 3"
>set l2 "4 5 6"
>set l3 [list $l1 $l2]
>set x [lindex [lindex $l3 1] 1]
>puts $x
>
>results in '5'
			.
			.
			.
I know a more affirmative way to express my point.
If I were in a Tcl shop, and my colleagues insisted
on expressing matrices in the clumsy way you've 
modeled above, then I would adopt the Lispish (to
connect this back to the subject line) approach,
quite natural in Tcl, of defining a special-purpose
syntax for the purpose.  In this case, by writing
one procedure definition, I can get the Tcl inter-
preter to evaluate all expressions of the form
  puts [x{1,1}]
or
  puts $x{1,1}
(you choose) in the way we'd want.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html



More information about the Python-list mailing list