Re: [Vala] Final / Sealed classes in Vala



Michael B. Trausch wrote:
The idea of a sealed/final class can be used to mean a few things:
...
To follow Phil with use cases, Libgee would be in great need for final 
classes and methods.
As an example, we would like that concrete collection implementations 
cannot be sub-classed. The public methods of these implementations all 
guarantee the respect of API contracts. Also those methods are for most 
overrides of virtual methods because the framework is made to be 
extensible and allow future enhancements (possibly by sub-classing).
There are Abstract* abstract classes available if one wants to start a 
new collection implementation.
Also it is worth to note that enabling sub-classing on concrete 
implementations (like it is now) allows a possible failure because of 
the badly-design GObject construction. Thanks to Jakob Kroon to have 
pointed that to me.
Best regards, Didier.




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