[haXe] Abstract Classes?

Nicolas Cannasse ncannasse at motion-twin.com
Tue Nov 7 18:25:54 CET 2006


>>Any way to get/simulate private abstract methods, Nicolas?
> 
> 
> I solved this one myself:
> 
> typedef UserApi = {
> 	function getName():String;
> 	function getText():String;
> }

Yes, that's problematic. I update haXe, in 1.09, you will be able to
define private functions in typedef :

typedef UserApi = {
    private function getName():String;
    private function getText():String;
}

This will not require that the function is actually private since an
hidden method can be redefined as visible, but not the other way.

Nicolas



More information about the Haxe mailing list