Re: [Vala] Final / Sealed classes in Vala

On Wed, 2009-09-23 at 19:01 +0200, Frederik wrote:
Didier 'Ptitjes' wrote:
I think the problem to not have it in Vala is more a technical problem
where nothing will avoid C users (in the current GObject) to subclass
the classes that would be marked as sealed in Vala.

Vala already has some features that are not represented in the generated
C code, only enforced by the Vala compiler, e.g. the 'protected' access

That is an arguable case, but I agree with your point. Not all C++ ABI's
for example, incorporate access scope into their name mangling, making
it mostly syntactic sugar at compile time. As far as 'protected' in vala
is concerned, last time I checked it was equivalent (and unchecked) to
public, but I might be wrong on that.

Concerning final classes; I agree with Didier, there are definitely
valid use cases for this. But like he seems to suggest having support
for 'final' classes in the GObject core (just like abstract and
additional runtime checking) might be a better way to pursue first.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]