ceylon / ceylon.language

DEPRECATED
Apache License 2.0
153 stars 57 forks source link

Metamodel: unreify private members #297

Open FroMage opened 11 years ago

FroMage commented 11 years ago

Gavin said we need to remove private stuff from the metamodel, I don't remember what, and I don't remember if that was from both the declarations and the model, but he will know.

FroMage commented 11 years ago

@gavinking before I do something wrong, what's the exact expected behaviour wrt non-shared for modules, packages, types, functions, methods, values, attributes?

gavinking commented 11 years ago

I'm not sure. I don't quite know what this issue is about.

FroMage commented 11 years ago

It's exactly about what I've just asked you. I need a specification of which non-shared declarations and models are reified in the metamodel, and which are not.

gavinking commented 11 years ago

Well if we care about modularity, then we should not expose any non-shared thing via the metamodel, since doing so would give you a very trivial way to simply bypass language-level visibility controls.

FroMage commented 11 years ago

But bypass language-level visibility controls can also be a good thing.

FroMage commented 11 years ago

And we can't not expose non-shared types, since they are visible to users via their instances.

FroMage commented 11 years ago

If I do that now, @chochos will kill me, so I propose to delay until 1.1

FroMage commented 11 years ago

I don't want to die.

FroMage commented 11 years ago

I'm too young.

chochos commented 11 years ago

Actually in JS there is no way to retrieve non-shared top-level stuff at least. I mean you can get the declaration at most, but there's no way you can get to the actual method/type/value. That's why you need to share a top-level function if you want to run it in js.

FroMage commented 11 years ago

I think we need more time for a discussion so we'll let that slip. In particular non-shared types cannot be invisible in the metamodel, since we can obtain non-shared types from their instances. Also non-shared class parameters should at least be visible as declarations, if not as models.

FroMage commented 10 years ago

Moving to 1.2