-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cross reference multiple extends rule, and related cleanup #2978
Conversation
Also changing from quotes to braces around list of inputs.
chapters/inheritance.tex
Outdated
@@ -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. |
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.
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.
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.
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.
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.
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.
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.
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 individualextends
-clause is also forbidden to interfere with itself in this way).
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.
To me, another
extends
-clause has the risk of being interpreted as also includingextends
-clauses in other classes, such as in derived classes. The another's was meant to keep the reference to one of theseextends
-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 individualextends
-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"
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.
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.
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 apart from one line.
Addressing review comment by Hans.
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.
Ok
The core of this PR is fix an unreported problem of finding the rule that says that
extends
-clauses must not interfere.