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

Jay O'Connor joconnor at cybermesa.com
Fri Nov 8 03:19:59 EST 2002


In article <usoc5fda35flc6 at corp.supernews.com>, "Cameron Laird"
<claird at lairds.com> wrote:

> 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'
>>
>>using 'set x(1,1)
>>results in an error
> Yes and no.  Tcl is awful for structuring data complexly in analogy to
> C.  

Well actually, TCL is not bad in handling date in comparison to C (and I
made that point to my co-workers)

However, my comparison was to Python, and in that respect TCL is
substandard to both Python(and a whole host of other languages
invented since C)

> It's at least medi- ocre, though, at handling complex data in its
> own idioms.

Well, the original analogy was that different approaches to syntax in a
language do lead to qualitative differences in the usages of those
languages

> I'm
> saying that all the well-crafted systems for managing matrices in Tcl do
> NOT just make them as nested lists.

Matrices are a simple data structure.  Business data tends to be more
complicated.  My example was extremely simplistic in comparison the the
heterogenous nested data that was trying to be handled using similar
techniques.

> One possibility for a
> nicely-engineered Tcl matrix handler is to refer to the "upper left"
> element as "x(1,1)".  

Which fails when you start trying to put arrays in it.

You're thinking of "[lindex[lindex[.. " as indicating a matrix. I'm
thinking in terms of a list of records where each record contains both
simple data and complex data.  As long as you have multi-dimensional data
of simple form, it's easy.  When the data is a heterogenous mix of
values, lists, lists of lists, and arrays, the  messines of the code gets
quite bad

> I'm sorry that your co-workers imposed such an unaesthetic misuse of Tcl as you describe on you.

Unfortuately I have yet to see that the usage would be considered
'unaesthetic misuse' simply because I have yet to see a working
alternative that is an simpler

> <URL: http://wiki.tcl.tk/2995 > has more on the subject.

Yes, I notice non of the proposals can scale easily beyond simplistic
usage in either size of problem space or complexity of problem.

-- 
Jay O'Connor
joconnor at cybermesa.com
http://www.r4h.org/r4hsoftware



More information about the Python-list mailing list