The pain is somewhat mitigated by tagged arguments:
# let f ~x ~y = x - y;; val f : x:int -> y:int -> int = <fun> # f ~y:5;; - : x:int -> int = <fun> # f ~x:6;; - : y:int -> int = <fun>
That way, if you want to write down shortcuts (which some claim to make the code more readable), you can get the behavior you need. Of course, it depends on the situation.
seanmcl
source share