← Back to team overview

p2psp team mailing list archive

Re: Inheritance and subclass creation

 

Well, I can understand the warning said in [3] but, taking into
account that both solutions do not seem too much "pure", from the
traditional point of view of the OOP, your proposal Max is much more
elegant and simple. Good idea.

2015-06-25 15:32 GMT-04:00 Max Mertens <max.mail@xxxxxxxxxx>:
> Hi Vicente,
>
> I pushed the code and created a pull request [1]. Extending the peers by the
> functionality of the subclass is happening implicitly, creating the peers
> has the same syntax as before, though the constructors do not need to copy
> attributes and only one object instance per peer is created.
>
> Regards,
> Max
>
> [1] https://github.com/P2PSP/p2psp/pull/43
>
> On 22.06.2015 15:32, Vicente Gonzalez wrote:
>
> Hi Max!
>
> Sorry, I can't remember why the inheritance was implemented in that way. I
> think that your idea is simpler than the solution that now is used in the
> current implementation. Please, go ahead :-)
>
> Regards,
> Vi.
>
>


Follow ups

References