Overview of Haxe code snippets, examples and tutorials tagged with type params.
Aug 16, 2016 Abstract types / Strict typing for stringly-typed extern code
A common pattern, often found in (but not only in) dynamic languages, is to denote the type of some object with a string, for example:‥
Nov 21, 2017 Abstract types / Using Iterators as Generic Type Parameters
Iterators are a helpful Haxe structure. Any structure that implements the next and hasNext functions with the appropriate signature will allow you build a for loop. Arrays have an iterator() function that returns exactly this, and you don't need to call it, the for language construction does it for you.‥