This is the best way of papering over the cracks in Haxe's constructor story and import system.

write a static function called cook, it returns an object with the type name as a field, and a tuple of constructors as values.

somewhere else call cook().cons(cook()).cons(cook), and that's a fully typed entry point for the constructors you want exposed.

https://codeberg.org/ohmrun/cook

#Haxe #DevLog