You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"polymorphic method types must be fully explicit in class definitions".
This is surprising because:
function types can almost always stay implicit (this is one of the great
features of ocaml)
in the example given, if one omits the type for the method "fold", the error
message gives the exact missing type! If ocaml is so clever as to guess the
missing type (just like it brightly does for functions) then why does the
programmer have to state it explicitly?
I think adding just a couple of lines trying to clarify this explicit method
type mystery in section 3.11 would make the manual easier to read.
This could be:
a counter-example where the error message does not show that ocaml is able to
infer the method type by itself
a very short description of the reason that prevents method types from being
implicit, with a reference to further information
anything else that makes this mystery look like a motivated choice as opposed
to a weird, "un-natural" design decision.
The text was updated successfully, but these errors were encountered:
Original bug ID: 3570
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: implicit polymorphic methods
Version: 3.08.2
OS: linux
Submission from: lns-vlq-25-ren-82-255-137-244.adsl.proxad.net (82.255.137.244)
This is a small suggestion for the reference manual.
http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html#ss:polymorphic-methods
Section 3.11
"polymorphic method types must be fully explicit in class definitions".
This is surprising because:
features of ocaml)
message gives the exact missing type! If ocaml is so clever as to guess the
missing type (just like it brightly does for functions) then why does the
programmer have to state it explicitly?
I think adding just a couple of lines trying to clarify this explicit method
type mystery in section 3.11 would make the manual easier to read.
This could be:
infer the method type by itself
implicit, with a reference to further information
to a weird, "un-natural" design decision.
The text was updated successfully, but these errors were encountered: