Hi Folks,
This question is directly applicable to VFP but also to other OO languages.
My framework currently has some abstract nonvisual classes. They all
inherit from my framework's subclass of Custom, STCustom. None of the
methods in these classes contain code beyond the occasional LPARAMETERS
statement.
As I work on revamping my framework I am revisiting this.
In OO models that don't have code inheritance, as well as those that have
multiple inheritance, and those that have bondage-and-discipline typing
rules, the notion of an "interface" as opposed to a "subclass" has real
meaning. (There are also COM published interfaces as well.)
I created the abstract classes in my VFP framework basically because people
who knew a lot more than I did back in 2004 said it's a good practice.
Today though, I don't see any real benefit from them in VFP. VFP has full
code inheritance, so the abstract classes are just an extra layer in the
object hierarchy and an extra .prg file I have to include in my applications.
Question 1:
Are there any real benefits to using abstract classes between one's
immediate subclasses of all VFP controls, and one's first layer of concrete
classes, in VFP? If so, what are they?
Question 2:
I am probably going to migrate my code to Python in the next 4-5 years (or
maybe to some similar language that doesn't exist yet; right now the goal
is to be able to use Dabo for development). Python has multiple inheritance
via mix-ins. However, based on my limited understanding, this looks like
full code inheritance, not just interface inheritance. Assuming that's
true, is there any benefit to using abstract classes in Python in general?
With Dabo in particular?
Thanks very much for any and all thoughts on this subject.
Ken Dibble
www.stic-cil.org
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.