Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'function,': 0.07; 'python': 0.08; 'fyi,': 0.16; 'methods,': 0.16; 'received:192.168.200': 0.16; 'subject:OOP': 0.16; 'syntactical': 0.16; 'cc:addr:python-list': 0.16; 'syntax': 0.16; 'wrote:': 0.16; 'functions,': 0.18; 'programming': 0.20; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'function': 0.27; 'cc:addr:python.org': 0.30; 'oop': 0.30; 'programm': 0.30; 'equivalent': 0.31; 'functional': 0.31; 'header:User-Agent:1': 0.34; 'requirements': 0.34; 'identical': 0.34; 'uses': 0.35; 'object': 0.35; 'post': 0.36; 'skip:" 10': 0.36; 'but': 0.37; 'some': 0.38; 'subject:: ': 0.39; 'received:192': 0.39; 'header:Received:6': 0.60; 'more': 0.60; 'your': 0.61; 'world': 0.62; 'cause': 0.67; 'william': 0.68; 'to:addr:noreply': 0.73; 'confusion.': 0.91 X-IronPort-AV: E=Sophos;i="4.68,335,1312149600"; d="scan'208";a="2171573" X-Virus-Scanned: amavisd-new at zimbra.sequans.com Date: Mon, 05 Sep 2011 21:04:37 +0200 From: Jean-Michel Pichavant User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) MIME-Version: 1.0 To: William Gill Subject: Re: Functions vs OOP References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315249547 news.xs4all.nl 2505 [2001:888:2000:d::a6]:45827 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12788 William Gill wrote: > > Not to split hairs, but syntactically f(x) is a function in many > programming paradigms. > > As I understand it functional programming places specific requirements > on functions, i.e.referential transparency. So f(x) may or may not be > "functional". > > x.f() is also a function, but it is a member of the object x, is > referred to as a 'method' of x, and uses the syntactical "dot" > notation object"dot"function for identification. > Functional programming is not about writing a programm with functions (google it for more info). This may cause some confusion. Your original post was about functions vs methods, which are identical except some syntax detail. FYI, in python x.f() is equivalent to f(x). In an OOP world one will prefer the x.f() form. JM