[haXe] Constructor constraints

Michael Pliskin pl at tepkom.ru
Fri Apr 28 17:00:51 CEST 2006


Hello list,

  I think a nice feature to add to haxe would be the constructor
  constraints. Currently, for instance, it is not possible to write
  smth like

  class C {
    public function new() {}
  }

  class D<T> {
    public function new() {
       var c = new T();
    }
  }

  and then use D<C> in a way you like. This restriction means that you
  can't create templating classes at runtime which is not
  convenient...

-- 
Best regards,
 Michael                          mailto:pl at tepkom.ru




More information about the Haxe mailing list