Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[imp-dev] Semantics of TypeStore

Hi Bob,

I was talking about TypeStore with Arnold Lankamp and we were thinking of removing
some functionality from it. Currently it implements an "import" functionality, which is designed
to lookup types through TypeStores that refer to eachother. The current implementation
does not interpret imports transitively. It simply searches for a type locally, and then in all
the imported TypeStores.

This design is inspired directly by the semantics of Rascal, but what if you want something different?
Sometimes you might want to have transitive imports, sometimes you don't. The fact that
we can discuss this is a hint that we may not want this functionality at all on the PDB level.

So, we could remove the import functionality from TypeStore, and instead add an 'addAll(TypeStore other)'
method to it. Then, the TypeStore acts like a store that manages (and checks) type declarations on the PDB level,
but nothing more. More advanced functionality could be implemented by user-defined sub-classes of TypeStore or
other classes that manage TypeStores. Or, direct API users in Java would probably need nothing more then this
simple TypeStore functionality.

What are your thoughts on this?

Cheers,

Jurgen

Back to the top