Re: Is Python a functional programming language?

2010-05-15 Thread travis+ml-python
On Mon, May 10, 2010 at 08:45:51PM +0100, Nobody wrote: On Tue, 11 May 2010 00:24:22 +1200, Samuel Williams wrote: Is Python a functional programming language? Not in any meaningful sense of the term. LOL I heard that lambdas were limited to a single expression, Yes. In a functional

Re: Is Python a functional programming language?

2010-05-15 Thread Aahz
In article mailman.223.1273942083.32709.python-l...@python.org, travis+ml-pyt...@subspacefield.org wrote: One very annoying thing in Python is the distinction between statements and expressions. One extremely valuable thing in Python is the distinction between statements and expressions. In

Re: Is Python a functional programming language?

2010-05-15 Thread Terry Reedy
On 5/15/2010 12:42 PM, travis+ml-pyt...@subspacefield.org wrote: One very annoying thing in Python is the distinction between statements and expressions. GvR regards it as a feature, claiming that research in the 1980s showed that the syntactic heterogeneity aided comprehension. I believe

Re: Is Python a functional programming language?

2010-05-15 Thread Paul Rubin
travis+ml-pyt...@subspacefield.org writes: To be fair, it appears that Python's whitespace-sensitive syntax sort of precludes the make a complex function on one line that is typical of languages which don't have statement/expression distinctions, but I'm not convinced it couldn't be solved,

Re: Is Python a functional programming language?

2010-05-14 Thread Nobody
On Tue, 11 May 2010 18:31:03 -0700, Paul Rubin wrote: is called an equation rather than an assignment. It declares x is equal to 3, rather than directing x to be set to 3. If someplace else in the program you say x = 4, that is an error, normally caught by the compiler, since x cannot be

Re: Is Python a functional programming language?

2010-05-14 Thread Chris Rebert
On Fri, May 14, 2010 at 12:08 PM, Nobody nob...@nowhere.com wrote: On Tue, 11 May 2010 18:31:03 -0700, Paul Rubin wrote: is called an equation rather than an assignment.  It declares x is equal to 3, rather than directing x to be set to 3.  If someplace else in the program you say x = 4, that

Re: Is Python a functional programming language?

2010-05-14 Thread Nobody
On Thu, 13 May 2010 12:29:08 +1200, Lawrence D'Oliveiro wrote: Some people would prefer to have a manageable set of rules rather than having to remember the results of all of the possible combinations of interactions between language features. What are you accusing Python of, exactly? I'm

Re: Is Python a functional programming language?

2010-05-12 Thread Alia Khouri
Paul Rubin: I like learnyouahaskell.com if you want to get some exposure to Haskell, probably the archetypal functional language these days.  I've been fooling with it on and off for the past couple years.  I'm still not convinced that it's that good a vehicle for practical general purpose

Re: Is Python a functional programming language?

2010-05-12 Thread Lawrence D'Oliveiro
In message pan.2010.05.11.20.07.09.579...@nowhere.com, Nobody wrote: On Tue, 11 May 2010 23:13:10 +1200, Lawrence D'Oliveiro wrote: But the beauty is that Python is multi-paradigm ... The trouble with “multi-paradigm” is that it offends the zealots on all sides. Is that how you view

Re: Is Python a functional programming language?

2010-05-11 Thread Paul Rubin
Luis M. González luis...@gmail.com writes: That doesn't mean python can compete with other purely functional languages, but it's probably as functional as it can be for a more conventional, multiparadigm language. Ben Lippmeier made the interesting claim that one of the defining

Re: Is Python a functional programming language?

2010-05-11 Thread Lawrence D'Oliveiro
In message 7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin wrote: Python is a pragmatic language from an imperative tradition ... I thought the opposite of “functional” was “procedural”, not “imperative”. The opposite to the latter is “declarative”. But (nearly) all procedural languages also

Re: Is Python a functional programming language?

2010-05-11 Thread Lawrence D'Oliveiro
In message mailman.2848.1273495992.23598.python-l...@python.org, Stefan Behnel wrote: But the beauty is that Python is multi-paradigm ... The trouble with “multi-paradigm” is that it offends the zealots on all sides. It’s like saying that, to effect a compromise among multiple conflicting

Re: Is Python a functional programming language?

2010-05-11 Thread Stefan Behnel
Lawrence D'Oliveiro, 11.05.2010 13:13: Stefan Behnel wrote: But the beauty is that Python is multi-paradigm ... The trouble with “multi-paradigm” is that it offends the zealots on all sides. It’s like saying that, to effect a compromise among multiple conflicting monotheistic religions, we

Re: Is Python a functional programming language?

2010-05-11 Thread Paul Rubin
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: I thought the opposite of “functional” was “procedural”, not “imperative”. The opposite to the latter is “declarative”. But (nearly) all procedural languages also have declarative constructs, not just imperative ones (certainly

Re: Is Python a functional programming language?

2010-05-11 Thread Michele Simionato
On May 10, 8:18 pm, a...@pythoncraft.com (Aahz) wrote: saying that functional features are tacked on understates the case.  Consider how frequently people reach for list comps and gen exps.  Function dispatch through dicts is the standard replacement for a switch statement.  Lambda callbacks

Re: Is Python a functional programming language?

2010-05-11 Thread Terry Reedy
On 5/11/2010 7:11 AM, Lawrence D'Oliveiro wrote: In message7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin wrote: Python is a pragmatic language from an imperative tradition ... I thought the opposite of “functional” was “procedural”, not “imperative”. The opposite to the latter is

Re: Is Python a functional programming language?

2010-05-11 Thread Chris Rebert
On Tue, May 11, 2010 at 11:13 AM, Terry Reedy tjre...@udel.edu wrote: On 5/11/2010 7:11 AM, Lawrence D'Oliveiro wrote: In message7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin wrote: Python is a pragmatic language from an imperative tradition ... I thought the opposite of “functional” was

Re: Is Python a functional programming language?

2010-05-11 Thread Terry Reedy
On 5/11/2010 3:25 PM, Chris Rebert wrote: On Tue, May 11, 2010 at 11:13 AM, Terry Reedytjre...@udel.edu wrote: On 5/11/2010 7:11 AM, Lawrence D'Oliveiro wrote: In message7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin wrote: Python is a pragmatic language from an imperative tradition ... I

Re: Is Python a functional programming language?

2010-05-11 Thread Nobody
On Tue, 11 May 2010 07:36:30 -0700, Paul Rubin wrote: Offhand I can't tell that imperative and procedural mean something different. Both basically mean that the programmer specifies a series of steps for the computer to carry out. Functional languages are mostly declarative; for example, an

Re: Is Python a functional programming language?

2010-05-11 Thread Lie Ryan
On 05/12/10 05:25, Chris Rebert wrote: On Tue, May 11, 2010 at 11:13 AM, Terry Reedy tjre...@udel.edu wrote: On 5/11/2010 7:11 AM, Lawrence D'Oliveiro wrote: In message7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin wrote: Python is a pragmatic language from an imperative tradition ... I

Re: Is Python a functional programming language?

2010-05-11 Thread Nobody
On Tue, 11 May 2010 23:13:10 +1200, Lawrence D'Oliveiro wrote: But the beauty is that Python is multi-paradigm ... The trouble with “multi-paradigm” is that it offends the zealots on all sides. Is that how you view people who like languages to exhibit a degree of consistency? Some people

Re: Is Python a functional programming language?

2010-05-11 Thread Paul Rubin
Nobody nob...@nowhere.com writes: is called an equation rather than an assignment. It declares x is equal to 3, rather than directing x to be set to 3. If someplace else in the program you say x = 4, that is an error, normally caught by the compiler, since x cannot be equal to both 3 and 4.

Re: Is Python a functional programming language?

2010-05-10 Thread Stefan Behnel
Samuel Williams, 10.05.2010 14:24: Is Python a functional programming language? No. Python is a multi-paradigm language. But it does have functions (and methods) as first-class objects. Is this a paradigm that is well supported by both the language syntax and the general programming APIs?

Re: Is Python a functional programming language?

2010-05-10 Thread Bruno Desthuilliers
Samuel Williams a écrit : Dear Friends, Is Python a functional programming language? Depends on your definition of functional programming language, but well, not really. It's mostly an imperative, object-oriented (but not pure-object) language. It has some restricted support for some

Re: Is Python a functional programming language?

2010-05-10 Thread Paul Rubin
Samuel Williams space.ship.travel...@gmail.com writes: Is Python a functional programming language? It supports some aspects of functional programming but I wouldn't go as far as to call it an FPL. Is this a paradigm that is well supported by both the language syntax and the general

Re: Is Python a functional programming language?

2010-05-10 Thread Aahz
In article 7xvdavd4bq@ruckus.brouhaha.com, Paul Rubin no.em...@nospam.invalid wrote: If your goal is to engage in functional programming, you're better off using a language designed for that purpose. Python is a pragmatic language from an imperative tradition, that has some functional

Re: Is Python a functional programming language?

2010-05-10 Thread Nobody
On Tue, 11 May 2010 00:24:22 +1200, Samuel Williams wrote: Is Python a functional programming language? Not in any meaningful sense of the term. Is this a paradigm that is well supported by both the language syntax and the general programming APIs? No. I heard that lambdas were limited to

Re: Is Python a functional programming language?

2010-05-10 Thread Luis M . González
On 10 mayo, 09:24, Samuel Williams space.ship.travel...@gmail.com wrote: Dear Friends, Is Python a functional programming language? Is this a paradigm that is well supported by both the language syntax and the general programming APIs? I heard that lambdas were limited to a single

Re: Is Python a functional programming language?

2010-05-10 Thread Samuel Williams
Thanks to everyone for their great feedback, it is highly appreciated. Kind regards, Samuel -- http://mail.python.org/mailman/listinfo/python-list