A Macro for Collections

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

A Macro for Collections

blackdog

Hi,

I've blogged about a macro for collection classes. Briefly, the macro
adds new fields to a collection class corresponding to an enum being
added to the collection. This allows enums to be used as elements of a
collection without the annoyance of having to dereference their contents
in a switch - from within the class itself. It provides a single
instance injection as a by product.

blog: http://cloudshift.cl/post/11957511387/waking-up-to-haxe-macros

code: https://github.com/cloudshift/Core

R

--
Simplicity is the ultimate sophistication. ~ Leonardo da Vinci


--
haXe - an open source web programming language
http://haxe.org