[haXe] New feature : Properties

Martin Heidegger mastakaneda at gmail.com
Thu Apr 13 23:23:20 CEST 2006


>
> > *) What is about inheritance? Is a property used instead of a variable
> > like:
> >
> >  var a:MyType = new MySubType();
> >  a.x = 2 // x was a variable in MyType but is a setter/getter in
> MySubType
>
> Properties are just special class variables, they are inherited and
> can't be redefined in subtypes.


THAT is a problem!  Because what if you  want to implement some interface
that requires a property a but like to extend a class that already defined
(for internal uses, that you cant change, because its precompiled or closed
source) this variable?

> *) How are properties represented within the reflect API - i cant see
> > special methods for those in the API, and i cant find no description in
> > the documentation.
>
> Properties are also handled the same way variables are, except that in
> the case of a getter/setter property, the var value will always be null.


Why don't you implement a more detailed output ... that contains
informations about if the variable is setable/getable ... ?

yours
Martin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20060413/4f3ae3a8/attachment.htm


More information about the Haxe mailing list