Skip to content
lptr edited this page Sep 13, 2014 · 3 revisions

Can I use Haxe's RTTI in a Spaghetti module?

Using Std.is() and other Haxe standard methods to inspect the runtime type of objects is convenient, but is not supported across Spaghetti module boundaries. Haxe's RTTI is a Haxe-specific feature (obviously), and a Spaghetti module should not have information about its dependencies other than the Spaghetti APIs they implement. Relying on the fact that both module and dependency are written in Haxe is a violation of this rule. At any it should be possible to rewrite a module in TypeScript (which attaches no Haxe-like RTTI to its objects), and this shouldn't break anything in dependent modules.

Analytics

Clone this wiki locally