Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross reference multiple extends rule, and related cleanup #2978

Merged
merged 6 commits into from
Aug 19, 2021

Conversation

henrikt-ma
Copy link
Collaborator

The core of this PR is fix an unreported problem of finding the rule that says that extends-clauses must not interfere.

@@ -115,6 +115,7 @@ \section{Inheritance -- Extends Clause}\label{inheritance-extends-clause}
\subsection{Multiple Inheritance}\label{multiple-inheritance}

Multiple inheritance is possible since multiple \lstinline!extends!-clauses can be present in a class.
As stated in \cref{the-inherited-contents-of-the-element}, it is illegal for one of these \lstinline!extends!-clauses to influence the lookup of another's (or its own) class name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the genitive in "another's". Isn't clearer to write the class name of any extends clause (including itself) or something like that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up with this formulation because I wanted a (easy reading) reference to the extends-clauses in the same class – because this is what we mean, right? Once I know the answer to this, I can try to reformulate.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what we mean - so writing "the class name of another extends-clause" (I don't know how to add its own there) would make sense - it was just the "another's" that seems odd.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, another extends-clause has the risk of being interpreted as also including extends-clauses in other classes, such as in derived classes. The another's was meant to keep the reference to one of these extends-clauses without the need to repeat that phrase.

Is this too verbose?

… it is illegal for these extends-clauses to interfere by influencing the lookup of one another's class names (unrelated to multiple inheritance, an individual extends-clause is also forbidden to interfere with itself in this way).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, another extends-clause has the risk of being interpreted as also including extends-clauses in other classes, such as in derived classes. The another's was meant to keep the reference to one of these extends-clauses without the need to repeat that phrase.

Is this too verbose?

… it is illegal for these extends-clauses to interfere by influencing the lookup of one another's class names (unrelated to multiple inheritance, an individual extends-clause is also forbidden to interfere with itself in this way).

The main issue to me isn't verbosity, but that it isn't clear what "another" (or "another's") refers to.
Writing "another extends-clause" or "another extends-clause in the class" avoids any such issue.

However, the parenthesis seems too verbose and unneeded.
If we here want to clarify that it is illegal to influence the look of any other or extends-clause in the class and also the current extends-clause it is simpler to write "any extends-clause in the class" instead of "another"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I made an attempt in this direction. Since the sentences of the paragraph now appeared more disconnected, I made it a non-normative paragraph instead.

Copy link
Collaborator

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good apart from one line.

Copy link
Collaborator

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@HansOlsson HansOlsson merged commit bb2f4f0 into modelica:master Aug 19, 2021
@henrikt-ma henrikt-ma deleted the multiple-extends-crossref branch August 19, 2021 07:37
@HansOlsson HansOlsson added the M36 For pull requests merged into Modelica 3.6 label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M36 For pull requests merged into Modelica 3.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants