- Notifications
You must be signed in to change notification settings - Fork1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
PR#6676: move overriding class definitions to language reference chapter#1153
Conversation
manual/manual/refman/classes.etex Outdated
Since Ocaml 3.12, the keywords @"inherit!"@, @"val!"@ and @"method!"@ | ||
have the same semantics as @"inherit"@, @"val"@ and @"method"@, but | ||
they additionally require the definition they introduce to be an | ||
overriding. Namely, @"method!"@ requires @method-name@ to be already |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is an "overriding" a name in English? I suggest we should drop the "an". (I know this is the original text.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Good point, the current wording also makes me stop at some point, droping the "an" sounds better.
This looks fine to me. |
Clarifications/rewrites on the "First Hour With OCaml" tutorial.* add a section about using the OCaml Playground* mention what # means in the code examples* spell out what's happening more clearly for beginners---------Signed-off-by: Christine Rose <professor.rose@gmail.com>Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
This PR moves the description of overriding class definitions —
val!
,method!
andinherit!
— from the extension chapter to the language reference chapter, and add two short paragraphs in the object chapter of the tutorial. Since this language extension has a small syntactic footprint and a clearer semantic compared to theopen!
variant, I think it makes sense to integrate it in the already quite extensive description of the object system.