[haXe] Abstract Classes?

Daniel Cassidy lezekdan at gmail.com
Wed Dec 13 18:42:35 CET 2006


On 12/13/06, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
> > Hm... but then, there is not much point in allowing one to declare
> > private fields in a typedef, since those private fields are never
> > accessible from other objects.
>
> Yes, and that makes sense wrt "private" meaning ;)

Um, am I missing your point or are you missing mine?

This makes sense as a meaning of "private", yes. But, my point was
that the concept "private" is totally at odds with the purpose of a
typedef. A typedef is supposed to provide a signature that allows an
object's fields to be accessed safely regardless of the object's type.
A private field is of course never externally accessible, so it is
functionally useless to include it in the signature.

Although I indirectly requested private typedef fields in the first
place, I'd like to see them disappear from the language since they
don't do what I expected, and I doubt they'll do what other people
expect either. The simple fact of their presence in the language is
likely to fool people into thinking that they're useful when they're
not :).

Or, is there some other use for private fields in typedefs that I'm
missing? (Myself and my colleague just had a short argument about it
and neither of us can think of any).

Dan



More information about the Haxe mailing list