Python syntax in Lisp and Scheme

Doug Tolton doug at nospam.com
Wed Oct 8 17:09:12 EDT 2003


David Mertz wrote:

> There's something pathological in my posting untested code.  One more
> try:
> 
>     def categorize_jointly(preds, it):
>         results = [[] for _ in preds]
>         for x in it:
>             results[all(preds)(x)].append(x)
>         return results
> 
> |Come on.  Haskell has a nice type system.  Python is an application of
> |Greespun's Tenth Rule of programming.
> 
> Btw. This is more nonsense.  HOFs are not a special Lisp thing.  Haskell
> does them much better, for example... and so does Python.
> 
What is your basis for that statement?  I personally like the way Lisp 
does it much better, and I program in both Lisp and Python.  With Python 
  it's not immediately apparent if you are passing in a simple variable 
or a HOF.  Whereas in lisp with #' it's immediately obvious that you are 
receiving or sending a HOF that will potentially alter how the call 
operates.

IMO, that syntax is far clearner.

> Yours, David...
> 
> --
>  mertz@   _/_/_/_/_/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY:_/_/_/_/ v i
> gnosis  _/_/                    Postmodern Enterprises         _/_/  s r
> .cx    _/_/  MAKERS OF CHAOS....                              _/_/   i u
>       _/_/_/_/_/ LOOK FOR IT IN A NEIGHBORHOOD NEAR YOU_/_/_/_/_/    g s
> 
> 


-- 
Doug Tolton
(format t "~a@~a~a.~a" "dtolton" "ya" "hoo" "com")





More information about the Python-list mailing list