[fpc-devel] class abstract, class sealed implementation. please review.

"Vinzent Höfler" JeLlyFish.software at gmx.net
Mon Oct 19 17:49:35 CEST 2009


Paul Ishenin <webpirat at mail.ru>:

> Vinzent Höfler wrote:
> > And then inside the implementation:
> >
> > TNokia3720Phone.SomeMethod;
> > begin
> >    case self.Edition of
> >       n3720peStandard:
> >          ImplementedThatWay;
> >       n3720peDeluxe:
> >          ImplementedThisWay;
> >    end;
> > end;
> >   
> When you are phone manufacturer you know you model line very well.

*coughcough* Have you ever worked in the industry? Implementing customer requirements?

> So you can define final classes and intermediate very well. If 
> implemenetation is different then you are free to use
> 
> TNokia3720PhoneStandard = class sealed(TNokia3720Phone)
> TNokia3720PhoneDeluxe = class sealed(TNokia3720Phone)
> 
> and ofcource in this case TNokia3720Phone becomes not sealed.

You can do that. Of course. After shipping the final product. IOW: At a point where the software development for the product is finished, frozen and closed already.

> I don't want to continue this discussion.

So be it.

> Moreover I don't ask anybody to use it if they find this not useful.
> Those who need it will use it.
> What's the problem after all?

That it adds restrictions to the _users_ of the code without any compelling reason. IOW: It's not the developer of code who has to live with the restriction, but the user. Much like I hate that someone doesn't declare a method as "virtual" just because he didn't see any use for it.


Vinzent.

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



More information about the fpc-devel mailing list