[Grace-core] Statically-known and family-polymorphism

Michael Homer mwh at ecs.vuw.ac.nz
Thu Nov 20 23:33:31 PST 2014


On Fri, Nov 21, 2014 at 8:14 PM, Andrew P. Black
<andrew.p.black at gmail.com> wrote:
> So we really would like the “prettyAst" module to inherit from the “baseAst"
> module.   And there doesn’t seem to be an y good reason to prohibit this,
> because the contents of “baseAst” are statically known.   But I believe that
> Tim said that his proposal hinged on disallowing inheritance from modules.
To clarify, that wasn't a part of the proposal, but a reflection of
the status quo. A module was just an example of something that was
statically known, because you (already) can't inherit from it.
Anything that could have be inherited from at the time you access it
is an unsafe place to start a chain of requests you in turn inherit
from, so it's that that is the defining characteristic, rather than an
exhaustive list of cases. It may be that there are additional cases
that are safe, or that some of the listed ones can be unsafe and would
need further restriction.
-Michael



More information about the Grace-core mailing list