Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9833
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: Aw: Re: Aw: Functional style programming in python: what will you talk about if you have an hour on this topic? |
| Date | 2011-07-18 16:02 -0400 |
| References | <fe06e226-49ae-461a-906a-b9e9da769988@glegroupsg2000goo.googlegroups.com> <2783b9f2-89ea-4823-ae80-6ac9686ec7ce@glegroupsg2000goo.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1230.1311019510.1164.python-list@python.org> (permalink) |
On 7/18/2011 8:20 AM, Anthony Kong wrote: > Thanks for all the great suggestion. > > First of all, Carl is right that it does not take much to impress a > java programmer about the expressiveness of functional programming. > Covered map, reduce and filter as Rainer suggested. > > Emphasized the advantages of functional style as summarised by Steve > D'Aprano. > > I showcased the use of groupby() in itertools. Think about what it > takes to implement similar logic in Java. Also introduced the gotcha > of using groupby(): you must first sort the list in the same way you > want to group them by. > > > Then I got ambitious and tried to introduce partial(). I basically > lost everyone right there. They can understand what partial does but > do not know why it can be useful. My example was too trivial and it > did not help. What is the best way to introduce partial/currying? See my response to Kurian -- Partial Function Application -- just a few minutes ago. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Aw: Re: Aw: Functional style programming in python: what will you talk about if you have an hour on this topic? Anthony Kong <anthony.hw.kong@gmail.com> - 2011-07-18 05:20 -0700 Re: Aw: Re: Aw: Functional style programming in python: what will you talk about if you have an hour on this topic? Terry Reedy <tjreedy@udel.edu> - 2011-07-18 16:02 -0400
csiph-web