Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'say,': 0.05; 'subject:Python': 0.06; 'cc:addr:python-list': 0.11; 'python': 0.11; '"real"': 0.16; 'lambda': 0.16; 'subject:Programming': 0.16; 'variations': 0.16; 'exception': 0.16; 'sat,': 0.16; 'language': 0.16; 'wrote:': 0.18; '(but': 0.19; 'feb': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'sort': 0.25; '15,': 0.26; 'header:In- Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'programmers': 0.33; 'core': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'programming,': 0.36; 'scheme': 0.36; 'subject:one': 0.36; 'done': 0.36; 'subject:?': 0.36; 'should': 0.36; 'pm,': 0.38; 'functional': 0.39; 'users': 0.40; 'subject:Can': 0.60; 'new': 0.61; 'kind': 0.63; 'sum': 0.64; 'more': 0.64; 'love': 0.65; 'to:addr:gmail.com': 0.65; 'sam': 0.68; 'heavy': 0.81; 'old,': 0.85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=HHKXlQHSePPqNS3pJaBDjOW9btI6DJ3Qs+KjYOysENQ=; b=kedAL93qKnGov87BvniBgXURyhEytn58v0Zaj2wkwPCZBDwUGQlFU82Z+LLDkGWNjV NHPFN3DpW5jcqyHqex4IPYr78csD/PGuOd4rxfFef+bKBiWZ4Xgsiq1FF2XjjsNaHRD9 hwJdCYW0hy3FQu1AwNCaidYpWR/4RBRpO0VBtCI4KNbu3+laXwYEVEcjJdz1ag1/FFsT ycky0RpbZ/ui3SC5c0ZnJyA+r4zXBwHsdoV24zKb+Zc8Hxugj23iyOLL8wR7cy/en/lD dDL/F4j5OOEc2/TkC+L8UuiGW3EDDTdZpK7RwAkFYjoEDdw0ahLzUFddZsGkT6wJ0bpv /J5w== X-Received: by 10.140.37.146 with SMTP id r18mr24668612qgr.61.1392532776916; Sat, 15 Feb 2014 22:39:36 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <3fd33e3a-7774-4988-b725-4fed5472ac94@googlegroups.com> References: <3fd33e3a-7774-4988-b725-4fed5472ac94@googlegroups.com> From: Devin Jeanpierre Date: Sat, 15 Feb 2014 22:38:56 -0800 Subject: Re: Can one use Python to learn and even apply Functional Programming? To: Sam Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "comp.lang.python" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392532785 news.xs4all.nl 2876 [2001:888:2000:d::a6]:39559 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66510 On Sat, Feb 15, 2014 at 8:45 PM, Sam wrote: > I would like to learn and try out functional programming (FP). I love Pyt= hon and would like to use it to try FP. Some have advised me to use Haskell= instead because Python is not a good language for FP. I am sort of confuse= d at the moment. Is Python a dysfunctional programming language to apply FP= ? Can the more experienced Python users advise? Everything about FP that can be done in, say, Scheme, can be done in Python, with the exception of tail recursion (but that isn't important for "real" FP). But Scheme is old, and people keep thinking of new things and more interesting variations on the lambda calculus. Haskell is kind of the core of modern functional programming, and involves heavy use of concepts that do not exist or are visibly alien in Python. If you want to learn FP properly, you should learn Haskell. Otherwise you will likely be confused when you overhear functional programmers talking, whether it's about Hindley-Milner or sum types or eta conversion. -- Devin