-
Notifications
You must be signed in to change notification settings - Fork 1
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
definition of manifest #47
Comments
(derived from the Pomona draft above and emails w/ Michael) What is required to be manifest?The idea of "manifest" is that enough of the result of an expression can be determined at "manifest time" - i.e. when the module are loaded but before any code starts running.
What makes something manifest?
manifest and inheritanceAs Michael wrote: "Anything that can be inherited is an unsafe leftmost (implicit or explicit) receiver, including all surrounding classes and traits." The biggest question is whether we need this restriction or not - do we want to add in:
Alternatively we could undo some of the damage by adding in:
|
Note that this manifestness issue is only about things declared within traits and classes (objects), not types. We could have types being overriden within objects (although we'd have to recheck all supertraits/classes for each object see e.g. #72) and still NOT have types being overriden without types |
drafted based on cleaned up version of what I wrote above - https://github.com/gracelang/language/blob/portland-james/spec.md#manifest-expressions |
The definition in the spec says that self, outer, or any named method request resolved through a non-method scope are not manifest. So: should this be legal?
if the answer is no, then any manifest declaration (class, trait, type, annotation) can only makes sense at the top level. (local classes are OK I guess, but they can only be instantiated, never inherited from). If we want the answer to be yes then e.g. we either need a "final" annotation to stop things being overridden or excluded; probably make all classes and traits final; or have a version of manifest where everything is computed per-concrete-subclass class, rather than per-class definition. at which point many of these problems go away, at a cost of making checking harder (I hope) or impossible. |
Note that arguments to the things in |
Note also that you can't inherit from a potentially-overridable class. The spec needs to make this clear. |
about to be updated here - https://github.com/gracelang/language/blob/portland-james/spec.md#manifest-expressions |
We need to define what it means to be manifest (aka static).
Types and parent objects must be manifest!
There is a wrong definition here:
https://docs.google.com/document/d/1BMI2lLyPmRHmP2W7tXKY7mB6Lr56dX-THsGvO2cKWXg/edit#
The text was updated successfully, but these errors were encountered: