Movatterモバイル変換


[0]ホーム

URL:


why python annoys me

Oliver Korpillakorpo at 01019freenet.de
Fri Apr 20 23:01:22 EDT 2001


>> Python does not force you in thinking OO, procedural or functional.> That's what I ment.What about functional ? Pyhon doesn't either ENABLE you to work functional!!apply, filter and map are 3 nice functions, and the data types are nice, too,but without list comprehension or partial applicatiob, curried function etc.you can't use them that much neither...Haskell Quicksort:qsort:: Ord a=> [a] -> [a]qsort [] = []qsort (x:xs) = [y | y <- xs, y <= x] ++ [x] ++ [y | y <- xs, y > x]without list comprehension it's impossible (IMHO, of course) to match thisfunctional elegance. filter could suffice, but withoutpartial application or the ability to use function-local variables inlambda-expression definitions, you cannot redo a functional, recursive, puresolution.This is just toys! Nice toys, sometimes.Do not take this as defying Python ! I love it. But keep non-functional, as itis ;O)Ciao, Korpo


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp