Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'compile-time': 0.07; 'received:verizon.net': 0.07; 'terry': 0.07; 'python': 0.08; 'precedence': 0.09; 'readable': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'am,': 0.12; '16,': 0.15; 'subject:application': 0.15; '*args,': 0.16; 'expression.': 0.16; 'f(a,': 0.16; 'reedy': 0.16; 'subject:function': 0.16; 'versus': 0.16; 'language': 0.16; 'wrote:': 0.18; 'written': 0.19; 'jan': 0.19; 'subject:not': 0.19; 'header:In-Reply-To:1': 0.22; 'subject:use': 0.24; 'function': 0.27; 'anyway.': 0.29; 'pm,': 0.29; 'functional': 0.31; 'usually': 0.31; "i've": 0.32; 'supposed': 0.32; 'header:User-Agent:1': 0.33; 'header:X -Complaints-To:1': 0.34; 'rule': 0.34; 'especially': 0.34; 'to:addr:python-list': 0.35; 'received:org': 0.36; 'unless': 0.39; 'to:addr:python.org': 0.40; 'follow': 0.61; 'more': 0.61; 'song': 0.73; 'saving': 0.78; 'calls,': 0.84; 'subject:skip:j 10': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Why not use juxtaposition to indicate function application Date: Sat, 17 Mar 2012 00:38:27 -0400 References: <42cac695-761e-4cdb-aa3b-7c82789b76f9@h20g2000yqd.googlegroups.com> 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:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: <42cac695-761e-4cdb-aa3b-7c82789b76f9@h20g2000yqd.googlegroups.com> 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: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331959128 news.xs4all.nl 6850 [2001:888:2000:d::a6]:48731 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21797 On 3/16/2012 9:14 AM, bruno.desthuilliers@gmail.com wrote: > On Mar 16, 1:45 pm, Ray Song wrote: >> I confess i've indulged in Haskell and found >> f a >> more readable than >> f(a) > > Hmmm... What about: > > f a b > > versus > > f(a(b)) > > or was it supposed to be read as > > f(a)(b) > > > or as > > f(a, b) > > ?-) One also has to consider Python calls with *args, **kwds, and arg=obj. These are all compile-time SyntaxErrors unless inside parens that follow a expression. Also, function calls, especially in a functional language without side-effects, do not usually occur in isolation. 'f(a) + 3' would have to be written as '(f a) + 3', so saving of parens anyway. Also, is 'f a - 2' f(a -2) or f(a, -2)? A new precedence rule is needed to disambiguage. -- Terry Jan Reedy