Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21759

Re: Why not use juxtaposition to indicate function application

Date 2012-03-16 17:31 +0100
From Kiuhnm <kiuhnm03.4t.yahoo.it>
Newsgroups comp.lang.python
Subject Re: Why not use juxtaposition to indicate function application
References <mailman.722.1331901933.3037.python-list@python.org> <42cac695-761e-4cdb-aa3b-7c82789b76f9@h20g2000yqd.googlegroups.com> <4f636391$0$1382$4fafbaef@reader1.news.tin.it> <mailman.724.1331914436.3037.python-list@python.org>
Message-ID <4f636acb$0$1381$4fafbaef@reader1.news.tin.it> (permalink)
Organization TIN.IT (http://www.tin.it)

Show all headers | View raw


On 3/16/2012 17:13, Prasad, Ramit 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)
>>>
>>> ?-)
>>
>> That would be
>>     f (a b)          # Haskell
>>     f(a(b))          # Python
>
> I have not used Haskell so far, but in this case I think I prefer the
> 'Explicit is better than implicit.'

Are you sure that
   "call the function f with the params a and b"
is better than
   f a b
or
   f(a,b)
?

> I would probably always forget if it should be
>
> f a b
>
> or
>
> f ( a b )

You wouldn't, because Haskel's way is more regular and makes a lot of 
sense: parentheses are for grouping and that's it.

Kiuhnm

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why not use juxtaposition to indicate function application Ray Song <emacsray@gmail.com> - 2012-03-16 20:45 +0800
  Re: Why not use juxtaposition to indicate function application "bruno.desthuilliers@gmail.com" <bruno.desthuilliers@gmail.com> - 2012-03-16 06:14 -0700
    Re: Why not use juxtaposition to indicate function application Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-16 17:00 +0100
      RE: Why not use juxtaposition to indicate function application "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-16 16:13 +0000
        Re: Why not use juxtaposition to indicate function application Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-16 17:31 +0100
          Re: Why not use juxtaposition to indicate function application Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-16 16:45 +0000
            Re: Why not use juxtaposition to indicate function application Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-16 18:18 +0100
            Re: Why not use juxtaposition to indicate function application Ian Kelly <ian.g.kelly@gmail.com> - 2012-03-16 11:59 -0600
            Re: Why not use juxtaposition to indicate function application Serhiy Storchaka <storchaka@gmail.com> - 2012-03-16 22:57 +0200
            Re: Why not use juxtaposition to indicate function application Chris Rebert <clp2@rebertia.com> - 2012-03-16 14:02 -0700
            Re: Why not use juxtaposition to indicate function application Serhiy Storchaka <storchaka@gmail.com> - 2012-03-17 00:14 +0200
          Re: Why not use juxtaposition to indicate function application Tony the Tiger <tony@tiger.invalid> - 2012-03-16 16:55 -0500
    Re: Why not use juxtaposition to indicate function application Terry Reedy <tjreedy@udel.edu> - 2012-03-17 00:38 -0400
  Re: Why not use juxtaposition to indicate function application "Colin J. Williams" <cjw@ncf.ca> - 2012-03-16 11:06 -0400
  Haskellizing python (was Why not use juxtaposition to indicate function application) rusi <rustompmody@gmail.com> - 2012-03-16 22:26 -0700
  Re: Why not use juxtaposition to indicate function application Larry Hudson <orgnut@yahoo.com> - 2012-03-16 23:39 -0700

csiph-web