Graeme Geldenhuys wrote:
On 14/01/2008, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
Is there a way to abort the compilation in this cases instead of a warning ?
Currently not.

If you want to be that strict, then use Interfaces instead of Abstract classes

I always found (and still do in C#) that interfaces are good for forcing structure but bad for forcing good inheritance trees. The good thing about classes with abstract methods is that they form a point for inheritance. Interfaces - well, I regularly use interfaces to create a common structure, e.g. an API that will have both a webservice interface and a local interface. The common API is an interface in a separate assembly, used on both client and server to implement an identical API (client code can then link to either the local API or the webservice via a client that implements the same interface.) DotNet also makes reflection (RTTI) quite useful with interfaces too, but I digress. The point is that the webservice class, the client and the local API that the webservice wraps all implement the interface (the webservice usually just delegates responsibility to an internal instance), but none of them inherit from each other.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to