Re: [Vala] Final / Sealed classes in Vala



Didier 'Ptitjes' wrote:
Arto Karppinen wrote:
For those examples to apply to Vala, you would first have to explicitly
allow something to be virtualized, and then explicitly forbid that
virtualization, which would to me sound more like a design failure in
the framework rather something that Vala should support.

Then please explain how you do a multi-level class hierarchy with no 
virtual methods ? There needs a mean and we've shown plenty uses cases 
to seal a virtual methods chain.


I did not mean that there would not be any virtual methods, but rather
that in the scenario which Phil described there was no need to
virtualize anything, and therefore no need for final keyword.

Ofcourse you need to use virtual methods when to want somebody to be
allowed to modify the base clases behaviour. But in the example the
problem was introduced by Javas 'virtualize everything' behaviour and
the solution to this was also Java specific.

I still think that these kind of problems can be avoided in Vala code by
carefully selecting what and when to virtualize.

I'm sorry if i was unclear.


-- 
Arto Karppinen
------------------------------
arto karppinen iki fi



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