Currently, we have this trait heirarchy:
NamedSymbol <- ScopedSymbol <- Symbol
But there's really no reason for NamedSymbol to require ScopedSymbol, so this PR decouples them.
Now there's Symbol and 2 more specific kinds of symbols:
NamedSymbol (those with names) & ScopedSymbol (those in a scope), and these two have no relation to each other.
This change is motivated by the new module restriction.
With the new semantics, modules shouldn't implement ScopedSymbol anymore, but they should implement NamedSymbol.
They have a a name, but they aren't logically within a scope anymore. Modules are the scopes now.
In the past, modules could totally be within a scope: module Outer { module Inner {}} (Inner is within the scope of Outer).
Currently, we have this trait heirarchy:
NamedSymbol
<-ScopedSymbol
<-Symbol
But there's really no reason forNamedSymbol
to requireScopedSymbol
, so this PR decouples them.Now there's
Symbol
and 2 more specific kinds of symbols:NamedSymbol
(those with names) &ScopedSymbol
(those in a scope), and these two have no relation to each other.This change is motivated by the new module restriction. With the new semantics, modules shouldn't implement
ScopedSymbol
anymore, but they should implementNamedSymbol
. They have a a name, but they aren't logically within a scope anymore. Modules are the scopes now.In the past, modules could totally be within a scope:
module Outer { module Inner {}}
(Inner is within the scope of Outer).