Re: Gee RFC: Moving sane default implementations without any overhead to interfaces



On Tue, 2011-01-04 at 18:50 +0100, Didier 'Ptitjes' Villevalois wrote:
> Hi Maciej,
> 
> Glad to see you are fine. And happy new year btw.
> 
> On Tue, 2011-01-04 at 18:35 +0100, Maciej Piechotka wrote:
> > As there is support for virtual functions in interfaces I'd like to get
> > comments regarding moving some implementation from abstract classes to
> > interfaces.
> > 
> > The methods proposed to change:
> >  - Should have implementation based on different methods
> >  - Do not introduce any additional fields etc.
> > Some classes (AbstractMultiSet) will stay largely intact.
> 
> Could you point to the specific methods you would like move in
> interfaces ? I guess this would simplify the discussion.
> 

For example from AbstractCollection to Collection:
 - is_empty
 - to_array (if possible)
 - add_all
 - contains_all
 - remove_all
 - retain_all
 - element_type

But not:
 - read_only_view

> > Pros:
> >  - Allowing to reuse of implementations that cannot inherit from
> > abstract classes.
> 
> Do you speak for any potential external implementers of gee's
> interfaces ? (which is, btw, not currently a real concern for gee) If
> yes, are there specific use cases you have in mind ?
> 
> Or do you speak for the internal implementations gee provides ? If yes
> what exactly do we gain here ?
> 

External

Regards

Attachment: signature.asc
Description: This is a digitally signed message part



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