[haXe] arctic

Nicolas Cannasse ncannasse at motion-twin.com
Fri Nov 3 14:47:13 CET 2006


> Yes, I considered this approach as well. However, this will quickly lead
> to a classical Object Oriented design where each widget comes with it's
> own class.
> 
> In effect, each ArcticBlock enum entry would be mirrored by a
> corresponding class, as an alternative interface to the block. These
> classes would have the same properties as the enum members, but just in
> a different disguise.

I really love enums, and I think they are great to quickly describe UI
like you are doing in Arctic, but I think that you should only use them
as shortcuts to create a class hierarchy. It's very important IMHO to be
able to retrieve the actual classes instances created in the backround.

This way, you can also keep things very simple : have enums describing
the most generic properties and leave advanced ones to be directly
assigned by accessing instances.

I don't like so much classic inheritance OO schemes and usualy avoid
them in my code (that's maybe also the FP of doing things ;) ) but I'm
still convinced that the OO model is the most appropriate for UI. It's a
well known component/container hierarchy that can be easily extended.

Best,
Nicolas



More information about the Haxe mailing list