|
|
Darren New wrote:
> I would guess it makes the thing into an infix operator, while x[y] is
> neither prefix, postfix, infix, or ... whatever.
The word you're looking for is apparently "mixfix".
> Plus, list literals are [ ... ], so I'm guessing that x [ y ] is
> ambiguous as to whether you're calling function x with an argument
> htat's a one-element list containing y.
Yeah. Although like I said in my other reply, they already made
whitespace significant in the case of the "." character. I'm guessing
this one's a historical accident.
> Now, why they picked ! instead of (say) @ is beyond me.
That would have been a better choice, but it's already taken. (And not
even by another library function - it's actually *reserved* in the
syntax rules.)
You could have had "@@", but they chose "!" for whatever reason...
Then again, this is the same language that gives you "^" and "**". Wanna
take a guess what the difference is?
Haskell is a brilliant language, but I never said it was perfect. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|