[DUG] Abstract method

Rohit Gupta r.gupta at xtra.co.nz
Wed Sep 14 13:20:34 NZST 2005


At times like this, I miss the macro assembler - being able to have 
macros and to raise errors for other programmers. :-) When are we 
getting macros ?

Dennis Chuah wrote:

>
> Unlike Java and some other languages, Delphi has no mechanism to flag 
> a class as an abstract class, and so the compiler is not able to raise 
> an error if you declare a class that contains abstract methods.
>
> It can only issue a warning if you try to create an instance of the 
> class, which Jeremy rightly points out, ought to be a compile error. 
> However, there are other ways to create an instance of an abstract 
> class for which the compiler is not able to control, for example, 
> through a class type variable.
>

>> From: Jeremy North <jeremy.north at gmail.com>
>>
>> > If you subclass and do not override an abstract method then a
>> > warning/hint is raised regarding the abstract method.
>> > Read the hints and warnings ;)
>>
>> Which really should be a fatal error and is in .NET.
>>
>> cheers,
>> Jeremy
>
>
> _________________________________________________________________
> Shop ‘til you drop at XtraMSN Shopping 
> http://shopping.xtramsn.co.nz/home/
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>



More information about the Delphi mailing list