Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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

Merged
mshinwell merged 2 commits intoocaml:trunkfromOctachron:nme_class_override
May 4, 2017

Conversation

Octachron
Copy link
Member

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.

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
Copy link
Contributor

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.)

Copy link
MemberAuthor

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.

@mshinwell
Copy link
Contributor

This looks fine to me.

@mshinwellmshinwell merged commit2dc8621 intoocaml:trunkMay 4, 2017
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull requestJan 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 <professor.rose@gmail.com>Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@alainfrischalainfrischalainfrisch left review comments

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@Octachron@mshinwell@alainfrisch@gasche

[8]ページ先頭

©2009-2025 Movatter.jp