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  <d...@dotat.at>  http://dotat.at/
BISCAY SOUTHEAST FITZROY: NORTHEAST VEERING EAST 4 OR 5. MODERATE,
OCCASIONALLY SLIGHT IN BISCAY. FAIR. GOOD.

Reply via email to