[Python-ideas] Ruby-style Blocks in Python Idea
Steven D'Aprano
steve at pearwood.info
Mon Mar 9 17:46:46 CET 2009
On Tue, 10 Mar 2009 03:24:36 am Sturla Molden wrote:
> On 3/9/2009 4:45 PM, Aahz wrote:
> > There's a substantial minority (possibly even a majority) in the
> > Python community that abhors functional programming.
>
> There are a substantial minority that use Python for scientific
> computing (cf. numpy and scipy, the Hubble space telescope, the
> NEURON simulator, Sage, etc.) For numerical computing, functional
> programming often leads to code that are shorter and easier to read.
> That is, equations look like functions, not like classes.
I don't understand what you mean. As far as I can see, equations never
look like classes in Python, regardless of whether you are using
functional programming, object-oriented programming or procedural
programming. Can you give me an example of what you mean?
Secondly, the proposal relates to *anonymous* functions, which is a
small part of functional programming. Perhaps they are necessary in a
purely functional programming language, but Python is not such a
language. Python never *requires* anonymous functions, they are a
convenience and that's all.
--
Steven D'Aprano
More information about the Python-ideas
mailing list