Hi,
I have been looking around for an exact definition of why these two are different, programming and compiler wise. ?
Hi,
I have been looking around for an exact definition of why these two are different, programming and compiler wise. ?
Exactly, thanks!
For others; seems the real difference from that paper says Any has no dynamic field access.
This means any time(no pun intended) you use Any
as a type, you have to explicitly cast to a concrete type before you can use fields of the hidden Any
type after casting. eg (Field, Method access)
I think it’s best practice to:
Any
as much as, or use things like haxe.DynamicAccess
Dynamic
as last option because that disables all the goodness the compiler could give.I think, unless you write a library or access external stuff outside your Haxe code, using things like Any/Dynamic aren’t needed.
I have been writing bindings for JS so sludge is inevitable with that translation.
© 2018-2020 Haxe Foundation - Powered by Discourse