PR#6676: move overriding class definitions to language reference chapter#1153
Merged
mshinwell merged 2 commits intoocaml:trunkfrom May 4, 2017
Merged
PR#6676: move overriding class definitions to language reference chapter#1153mshinwell merged 2 commits intoocaml:trunkfrom
mshinwell merged 2 commits intoocaml:trunkfrom
Conversation
alainfrisch
reviewed
Apr 18, 2017
| 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 |
Contributor
There was a problem hiding this comment.
Is an "overriding" a name in English? I suggest we should drop the "an". (I know this is the original text.)
Member
Author
There was a problem hiding this comment.
Good point, the current wording also makes me stop at some point, droping the "an" sounds better.
Contributor
|
This looks fine to me. |
EmileTrotignon
pushed a commit
to EmileTrotignon/ocaml
that referenced
this pull request
Jan 12, 2024
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 <[email protected]> Co-authored-by: Christine Rose <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.