Dynamic class loading

Monkey Forums/Monkey Programming/Dynamic class loading

fsoft(Posted 2012) [#1]
Hi,

I was wondering: how difficult could it be to have Monkey doing dynamic class loading?

It could be implemented in this way:

stdcpp: .so or .dll depending on the platform
android: dynamic class loading
http://tutorials.jenkov.com/java-reflection/dynamic-class-loading-reloading.html

ios: .so (shared objects)
javascript: simply add new script tags at runtime

With dynamic class loading there could be a monkey trans that doesn't need to be recompiled when we add a new target and also big games could just load what they need...

Is it that difficult to implement?


Skn3(Posted 2012) [#2]
Sounds like a nice feature to have on all platforms. I did the html5 implementation of this for the pub nub module.

http://monkeycoder.co.nz/Community/posts.php?topic=2397

It injects the JavaScript at runtime!