Reflection / Serialization
Hi again :)
How to handle reflection and serialization in this project?
Is this possible / supported or any recommended libs?
If possible, is it also possible to reflect extern class (c++ classes defined in haxe)?
If I use the following I get:
haxe\std/haxe/Serializer.hx:75: characters 2-27 : Dynamic not supported. Consider using Any or generics instead?
import haxe.Serializer;
import haxe.Unserializer;
var serializer = new Serializer();
serializer.serialize("foo");
serializer.serialize(12);
var s = serializer.toString();
trace(s); // y3:fooi12
```
This project is currently incomplete! The Dynamic type and anything that uses it is currently unsupported, but that will change eventually.
You can define extern classes and they should work no problem!
Ah that's good to know! Hmm that's really interesting because technically this project doesn't really need most Haxe standard libs and could rely more on C++ libs. I will try using my own C++ serializer as an extern class.
How is the state of the reflection system though? I would like being able to export a list of all classes with their properties (type, name, default values) and methods at compile time. Is that something possible right now?
It's not possible right now, it will be eventually.