Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract classes useful?
Message
From
02/06/2008 10:46:20
 
 
To
02/06/2008 10:24:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01320973
Message ID:
01320989
Views:
12
>>What exactly is the purpose of abstract classes in VFP?
>
>Declaring a class as abstract in OTHER languages makes sure that the class won't be instantiated directly. The idea is that the class is somehow incomplete, and that some details have to be filled in at a lower level.

That's one idea that came to mind: Build in code that generates an 'error' when such an 'abstract' class is used in a concrete case. But it would probably be a ridiculous construction.

>This can't be enforced in Visual FoxPro, but I suppose it still makes sense to use inheritance in such a way that the superclass isn't useful by itself. But again, there is no way to enforce it.

Is there a good reason of are we just brainwashed to think that there is sense to use it?!
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform