Closed phlegmaticprogrammer closed 8 years ago
Unqualified constants are here to stay, they are just variables introduced by a context which is not on the main context thread (see #67).
Actually not so sure about this anymore, as currently all context constants seem to be qualified, except when doing namespace resolution.
I think the following kernel convention makes sense:
This will be implemented based on #67.
A different option would be to have only qualified context constants, but I think this would be awkward and could easily lead to misunderstandings (although it probably would not be inconsistent):
theory Foo
context
let 'bar = 10'
theorem '\Foo\bar = 10'
...
context
let 'bar = 20'
theorem '\Foo\bar = 20'
Here we would have two different conflicting theorems about the same object '\Foo\bar'
, and this looks like an inconsistency to the user. It's not really an inconsistency because '\Foo\bar'
refers to two different objects in different contexts, but the notation '\Foo\bar'
really suggests it is the same object.
Initially unqualified constants were thought to be private to the local namespace, but I am not so sure that this is a good idea any more.
Making something private could probably be achieved by already existing means.