This post originated from an RSS feed registered with Python Buzz
by Ted Leung.
Original Post: .Net, Functional Programming, and Python
Feed Title: Ted Leung on the air : computers/programming/python
Feed URL: http://www.sauria.com/blog/computers/programming/python?flav=rss
Feed Description: Ted Leung on the air: Open Source, Java, Python, and ...
Erik Meijer is
showing the relationship between C#/Java iterators and functional constructs such as fold and list comprehensions. He then points out that Python has already demonstrated how to incorporate fold and list comprehensions into an imperative langauge. I'm a fan of fold and list comprehensions, which is why I was happy to find them in Python. Meijer is right when he says
Most importantly many list transformers, including map and filter can be defined as both catamorphisms and anamorphisms, and list comprehensions are ultra sweet, but very thin syntactic sugar on top of the base language. In principle there is nothing that prevents special list transformers and comprehensions from being introduced into imperative languages as well. We know how to do it. In fact, as is the case for many other features, Python has already taken the lead in this.
When one of the designers of Haskell98 writes:
Pure functional programmers, your days are numbered. The grim reaper is knocking at your door.