Warning

In this chapter we've talked about the Dynamic type. We've been discussing this all through the chapter, but it is important to say it again: the Dynamic type is there to tell the compiler not to do any type checking.

Although the compiler won't complain, it doesn't mean that your code will run correctly. It will depend on the runtime. So, if you're targeting JavaScript which is a dynamic language it is likely that it will work without any problem, but if you're targeting a more static runtime there are chances that you will get into troubles for using Dynamic too much.

Most of the time, Dynamic is used when trying to use some native features of the runtime you're targeting or for interoperability purposes. It can also be used sometimes ...

Get haXe 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.