After reading this thread, I'm starting to thinking about another option, namely: "local un-open", because I certainly dislike ambiguity.

So, maybe, something like:

Vec.( ^(3 * v) * vx + vy)

where anything in ^(... ) is not subject local open.

Regards


În Mar, 4 aug. 2015 la 12:40, Daniel Bünzli <daniel.buenzli@erratique.ch> a scris:
Le mardi, 4 août 2015 à 10:26, Goswin von Brederlow a écrit :
> > let ox = V2.((dot v ox) * ox) in
> > V2.(3 * ox + oy)
>
> What is wrong with that code?
>
> I'm assuming V2 has:
>
> val (+): t -> t -> t
> val (*): int -> t -> t
> val dot: t -> t -> int

It also has

val ox : t

Daniel



--
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs