WurstScript
WurstScript copied to clipboard
Add dynamic inner classes
Like #213, but also dynamic inner classes.
[Note to self]
Open questions:
- Store only one reference to immediate enclosing class or a pointer to all or do it like with closures and actually check what is required?
- Do we need something like
x.new MyClass()as in Java? - Should instances of inner classes be destroyed automatically when destroying the parent object? (probably too expensive to keep a list of children)
- Optimize the case where there can be at most one child? In this case it would be possible to share ids.