Re: We know what you need, and we'll push it down your throat.

[prev] [thread] [next] [lurker] [Date index for 2006/12/22]

From: Tony Finch
Subject: Re: We know what you need, and we'll push it down your throat.
Date: 18:07 on 22 Dec 2006
On Fri, 22 Dec 2006, Juerd wrote:
>
> But the following set of wishes clashes heavily:
>
> - () can be used for grouping (to override precedence)
> - () can be used to enclose subroutine arguments
> - subroutines can also be used without ()
>
> The solution is to use heuristics, that cause inconsistencies all over
> the language.

Er, no. Functional programming languages have the three features you list
above, and they resolve the problem as follows:

* function application is denoted by juxtaposition
* the () around a function argument is just the usual grouping operator

The disadvantage is that function application usually binds tightly so in
most situations you still need to use () around the argument. To work
around that, Haskell has a $ operator which binds loosly and is an ugly
synonym for function application, and of course there's the . composition
operator for when your function is curried.

Tony.
-- 
f.a.n.finch  <dot@xxxxx.xx>  http://dotat.at/
BISCAY SOUTHEAST FITZROY: NORTHEAST VEERING EAST 4 OR 5. MODERATE,
OCCASIONALLY SLIGHT IN BISCAY. FAIR. GOOD.
There's stuff above here

Generated at 03:02 on 01 Jan 2007 by mariachi 0.52