Ted Leung on the air : Functional Programming and Perl roundup.

Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
2005年4月13日
Functional Programming and Perl roundup.

[ via Glenn Ehrlich's blog ]

It's a shame that I can't deal with Perl, because sometimes the Perl guys just knock my socks off:

Autrijus Tang is chronicling his efforts to build Pugs, a Perl6 implementation in Haskell. First off, this is just plain cool. Second, I have to hand it to the Pugs team for being willing to experiment with Haskell in this way. (The Python world has PyPy, which is also cool). Autrijus explained more of the story in this interview. Reading through Autrijus' blog gives a sense that there's a frenetic level of development and community forming around Pugs. You feel the rhythm of new committers being added. I'm also struck by the amount of use of SubEthaEdit -- I know there are a bunch of SEE clone efforts underway. I hope that one of them finishes soon.

From reading Autrijus's blog, I also learned that clkao, the author of svk, has implemented the darcs patch scheme in svk -- it looks like things are already heating up in the distributed version control space. This is good news to me. While I'm looking forward to a bk-like/arch-like source code system, I participate in enough communities that are going to stick to SVN (I hope not CVS) that svk is a realistic alternative. The last time I tried it, several versions ago, I couldn't get it to talk to CVS over ssh repositories, but maybe I should give it a whirl again.

Glenn also pointed out Mark Jason Dominus' new book Higher Order Perl, which explains the concepts of higher order programming to Perl folks. The book is actually online, so you can go over and see for yourself. I find it interesting that there's this flurry of activity around functional programming in the Perl community at the same moment that the Python community is looking to reduce the functional programming capabilities of Python.

[22:50] | [computers/programming] | # | TB | F | G | 4 Comments | Other blogs commenting on this post
I don't think it's fair to say functional capabilities are being removed from Python at all -- quite the contrary has happened. It's being proposed that some Lisp idioms be removed -- but Lisp is hardly the end-all be-all of functional programming. Those idioms (map and filter, though not reduce, which honestly I've never seen in useful code) were replaced some time ago by functional syntax (borrowed from Haskell) in the form of list comprehension, so you can hardly complain that anything is being lost, merely culled. Promoting builtins to syntax can hardly be seen as reducing capabilities.

And more recently generator expressions are a marked increase in functional capabilities, and itertools is far more interesting in functional terms than those three Lisp builtins. Generally I'd say the Python community (or Guido, or whoever) has become far more suspicious of techniques translated directly from other languages without any sensitivity to Python style, but that really doesn't effect the translation of fundamental and new programming styles, which the Python community remains quite open to.
Posted by
Ian Bicking at Thu Apr 14 00:01:18 2005

It's not at all clear to me that list comprehension notation is all that functional. Haskell has map and filter (I care less about reduce), and the Haskell wiki h ttp://haskell.org/hawiki/ThingsToAvoid shows the drawbacks of list comprehensions compared to the functional operators. I think that the wrong operators are being culled.

If you think that itertools is a good thing (and I agree), then I wonder why you think that a specialized syntax for list comps is good. I think that it would be better to have things be consistent.

Being forced to do things in a way that I think is inconsistent is a removal of capability as far as I'm concerned. I understand that There Is Only One Way To Do It, but in this case I think it's the wrong way.
Posted by
Ted Leung at Thu Apr 14 01:10:59 2005

Mostly because map doesn't work well with other Python code. E.g., map(lambda s: s.lower(), list_of_strs) is ugly (IMHO) compared to [s.lower() for s in list_of_strs]. And yeah, I hate the term "lambda" -- it makes no sense, and I seriously doubt Church ever gave that particular letter so much significance as Lisp people have since then.

If it weren't for methods, map might be more useful in Python. As it is, itertools.imap is sure to remain, and maybe map itself will be moved somewhere. Actually, there's a good chance map will stick around -- I think enough people can argue for its usefulness, even if filter and reduce aren't as interesting (in my experience filter usually can't be expressed usefully without lambdas).
Posted by
Ian Bicking at Thu Apr 14 10:02:09 2005

Hmm,

Point takon on methods. As far lambda goes, I could care less if the name is lambda. Higher order functions are important. The name of the keyword is not.

Just for the record, I don't think that Lisp is perfect, either.
Posted by
Ted Leung at Thu Apr 14 11:57:44 2005

You can subscribe to an RSS feed of the comments for this blog: RSS Feed for comments

Add a comment here:

You can use some HTML tags in the comment text:
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are: <a href>, <em>, <i>, <b>, <blockquote>, <br/>, <p>, <code>, <pre>, <cite>, <sub> and <sup>.

You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk

Name:


E-mail:


URL:


Comment:


Remember my info?


twl JPG

About

Ted Leung FOAF Explorer

I work at the Open Source Applications Foundation (OSAF).
The opinions expressed here are entirely my own, not those of my employer.

Creative Commons License
This work is licensed under a Creative Commons License.

Now available!
Professional XML Development with Apache Tools : Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Technorati Profile
PGP Key Fingerprint
My del.icio.us Bookmarks
My Flickr Photos


Syndicate
RSS 2.0 xml GIF
Comments (RSS 2.0) xml GIF
Atom 0.3 feed
Feedburner'ed RSS feed

< April 2005 >
Su Mo Tu We Th Fr Sa
1 2
17 18 19 20 21 22 23

Archives
2006
2005
2004
2003

Articles
Macintosh Tips and Tricks

Search
Blogs nearby
geourl PNG

Categories
/ (1567)
books/ (33)
computers/ (62)
hardware/ (15)
internet/ (58)
mail/ (11)
microcontent/ (58)
weblogs/ (174)
pyblosxom/ (36)
www/ (25)
open_source/ (145)
asf/ (53)
osaf/ (32)
chandler/ (35)
cosmo/ (1)
operating_systems/ (16)
linux/ (9)
debian/ (15)
ubuntu/ (2)
macosx/ (101)
tips/ (25)
windows_xp/ (4)
programming/ (156)
clr/ (1)
dotnet/ (13)
java/ (71)
eclipse/ (22)
lisp/ (34)
python/ (86)
smalltalk/ (4)
xml/ (18)
research/ (1)
security/ (4)
wireless/ (1)
culture/ (10)
film/ (8)
music/ (6)
education/ (13)
family/ (17)
gadgets/ (24)
misc/ (47)
people/ (18)
photography/ (25)
pictures/ (12)
places/ (3)
us/ (0)
wa/ (2)
bainbridge_island/ (17)
seattle/ (13)
skating/ (6)
society/ (20)



[Valid RSS]

del.icio.us linkblog

www.flickr.com

Blogroll

java.blogs
Listed on BlogShares


Where are visitors to this page?


pyblosxom GIF

AltStyle によって変換されたページ (->オリジナル) /