[haXe] Abstract Classes?

Rickard Nilsson rickard.nilsson at telia.com
Mon Nov 6 15:47:58 CET 2006


Yeah, exactly. Isn't Abstract Classes a perfectly good OO concept?

Is it a low priority feature, or is it not considered to be implemented at  
all?

/ Rickard

On Mon, 06 Nov 2006 09:54:56 +0100, Martin Heidegger  
<mastakaneda at gmail.com> wrote:

> Hmm: It does not look difficult to add support for Abstract classes.
> And throwing a exception always adds unnecessary overhead to the
> filesize, the dependencies and to documentation. What is the
> bad thing with Abstract classes (why does haXe not support it)?
>
> greetings
> Martin.
>
>
> 2006/11/6, Nicolas Cannasse <ncannasse at motion-twin.com>:
>>
>> > Hi,
>> >
>> > Is it somehow possible to declare abstract classes in haxe? Have I
>> missed
>> > something obvious, or is that feature not implemented in haxe?
>> >
>> > / Rickard
>>
>> There is no abstract classes in haXe, but you can define a private
>> constructor. This way, such a class can't be constructed. Only
>> subclasses might define a public constructor.
>>
>> There is no abstract method either, so you need to define an empty body
>> (or maybe throw an exception) in the main class. These functions will be
>> overridden in subclasses.
>>
>> Nicolas
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>
>
>
>





More information about the Haxe mailing list