Well after complaining publically that people spend too much time
worrying about concrete syntax; I'm now going to do just that :-)

I've recently "discovered" arrays in Haskell and in writing a program
or two wrote something like :-

  f x!i

I assumed that this would apply _f_ to the _i_th element of _x_.  How
wrong I was :-) It applies _f_ to the array _x_ and indexes the _i_th
element of the resulting array (using the rule that function
application binds most tightly of all).  I'm not saying this is wrong,
but I think the former interpretation is one that is more useful
especially in mathematical code where this sort of operation appears
many times and the latter interpretation hardly ever.

This doesn't mean I'm pushing for a change, especially as breaking the
"functions binds tightest" rule would be a major change.  However,
having to write lots of lines like "f (x!i)" under the current rules
rather than the occasional "(f x)!i" under alternative rules is
proving taxing for this ex FORTRAN weenie :-)  

bevan

Reply via email to