Is it possible to redefine or remove a class in a build macro? I'd like to replace a class with an abstract. E.g.class Test
with abstract Test (Int) to Int
.
If explicitly redefining a type is not possible would changing call sights to it be? So instead of standard.module.Test change them to abstract.moduld.Test after Context generation?
src1/foo/Bar.hx
and src2/foo/Bar.hx
and -cp src1 -cp src2
foo.Bar
type will be used
I'm just trying to make some syntactic sugar for some code that will need a quite a few abstracts.
I need a lot of data locality and I can solve this with abstracts by using Abstract(int) to int. Then have the abstract contain static byte arrays for properties. To access an "object" you just specify the proper index.
This route does end up requiring a lot of get_x and set_x functions that just access the underlying arrays. I'd like to generate all of this code from a typedef or class instead. I basically just want to be able to do:
class Point implements Allocator { var x: Int; var y: Int; } and have my crazy abstract made.