Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'instance,': 0.05; 'distinction': 0.07; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; '*is*': 0.09; 'arguments,': 0.09; 'mapped': 0.09; 'programmers.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'tuple': 0.09; 'am,': 0.12; '"programming': 0.16; '*do*': 0.16; 'did,': 0.16; 'drawn': 0.16; 'reedy': 0.16; 'subject:OOP': 0.16; 'written': 0.16; 'wrote:': 0.16; 'jan': 0.19; 'programming': 0.20; 'science.': 0.21; 'assume': 0.22; 'header:In-Reply-To:1': 0.22; '(or': 0.23; 'variable': 0.24; 'says': 0.25; 'url:wiki': 0.25; 'function': 0.27; 'beyond': 0.28; 'otherwise.': 0.28; 'correct': 0.28; 'article.': 0.30; 'kelly': 0.30; 'functional': 0.31; 'values': 0.32; 'value.': 0.32; 'generally': 0.32; 'probably': 0.33; 'technical': 0.33; 'there': 0.33; 'to:addr:python-list': 0.33; 'however,': 0.34; 'someone': 0.34; 'header:User-Agent:1': 0.34; 'function.': 0.34; 'header:X-Complaints-To:1': 0.35; 'external': 0.35; 'object': 0.35; 'issue': 0.36; 'another': 0.37; 'depend': 0.37; 'using': 0.37; 'but': 0.37; 'two': 0.37; 'could': 0.38; 'think': 0.38; 'received:org': 0.38; 'maps': 0.38; 'accepted': 0.38; 'url:org': 0.38; 'subject:: ': 0.39; 'url:en': 0.39; 'header :Mime-Version:1': 0.39; 'meaning': 0.39; 'to:addr:python.org': 0.39; 'sense': 0.39; 'called': 0.40; "it's": 0.40; 'where': 0.40; 'your': 0.61; 'results': 0.61; 'our': 0.63; 'here.': 0.66; 'readers': 0.71; 'url:secure': 0.73; 'url:wikimedia': 0.84; 'william,': 0.84; 'imperative': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Functions vs OOP Date: Sun, 04 Sep 2011 14:32:07 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-74-109-121-73.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315161191 news.xs4all.nl 2435 [2001:888:2000:d::a6]:46470 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12745 On 9/4/2011 4:13 AM, tinnews@isbd.co.uk wrote: > Ian Kelly wrote: >> Functional programming is about using functions in the *mathematical* >> sense. A mathematical function maps one value (or tuple of values) to >> another value. The mapped value never varies; if it did, it would be >> a different function. So functional programming eschews the use of >> functions where the results depend on any internal or external state >> beyond the values of the passed-in arguments, such as the variable >> state of the object the method is being called on. >> > I think there may be another issue here. If someone says "functional > programming" to me then I would generally assume that they *do* mean > "programming using functions". While your distinction of the two may > be strictly correct I don't think it's the generally accepted meaning. The distintion drawn by Ian *is* generally accepted in computer science. See https://secure.wikimedia.org/wikipedia/en/wiki/Functional_programming For instance, programming is C is imperative programming with functions but it generally is not 'functional programming' in the sense referred to by Ian and the Wikipedia article. Given that our docs are written by people who do understand the technical distinction, you are probably wrong to assume otherwise. However, as I said to William, it is possible that our docs could be improved so as to not depend on all readers having prior knowledge of the intended meaning of 'functional programming'. As the use of Python has expanded, so has the variety of backgrounds of Python programmers. -- Terry Jan Reedy