Lisp refactoring puzzle

Terry Reedy tjreedy at udel.edu
Tue Jul 12 17:03:08 CEST 2011


On 7/11/2011 11:37 PM, Xah Lee wrote:
> it's funny, in all these supposedly modern high-level langs, they
> don't provide even simple list manipulation functions such as union,
> intersection, and the like. Not in perl, not in python,

Union and intersection are set operations, not list operations. Python 
has had a set type with a full set of set operations for several years. 
It has list concatenation, which is the list equivalent of union. It has 
lots of other useful list operations.

 > Mathematica has Union, Intersection, and a host of others
 > some 20 years ago, and today it has a complete set of combinatorics
 > functions as *builtin* functions

Python has the basic combinatoric function in the itertools module, 
though they are not used much. If Mathematica has Catalan sequences 
builtin, I wonder how much they are used. Since Python is free, in both 
meanings, it does not have paid people sitting around writing things to 
pad numbers to justify a $2k price tag. On the other hand, lots of 
people have added and made available lots of good add-ons. Mathematica 
should probably be most fairly compared with Python+numpy+scipy and 
maybe a few other things.

-- 
Terry Jan Reedy




More information about the Python-list mailing list