Version française
Home     About     Download     Resources     Contact us    
Browse thread
non-symbol infix functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris Hecker <checker@d...>
Subject: non-symbol infix functions

This simply has to be an FAQ, but I can't find a single reference to it in the FAQ or the manual (except the BNF, which is wrong, I think).  

There's no way to define an arbitrarily named infix function, right?  The BNF in the manual implies you can't do it.  But at the same time, that BNF implies you can't have "external" infix operators that aren't value-names (which have to be either lowercase-ident or ( operator-name )).  Yet, pervasives.mli has "external (lsl)..." in it.

So, why can there be an external (lsl) but not a let (lsl) x y = ...?  If it's true that you can't do it internally, why did you guys bother hacking lsl and the other bit ops to be infix, since it breaks consistency (and taunts the programmer with a non-symbol infix operator the likes of which he can't make himself)?

Perhaps this should be added to the FAQ?

Chris