How to make the Haxe compiler emit a separate type for each generic

I am building a HAXE->GOLANG compiler, using customer JS generator API

I’ve already worked out many things, like OOP, and getting the types.

Go 1.18 finally introduced some generics, but not fully.

I see that its possible to mark a class as @:generic Generic - Haxe - The Cross-platform Toolkit
How could I cause the compiler to treat all classes like this?

Hello I believe you can use a init macro and then Context.onGenerate and iterate through the types and add @:generic to all the classes.

I’ve already worked out many things, like OOP, and getting the types.

This is great news, I am working on a project in the reverse direction Golang → Haxe compiler.

It is called go2hx and we would be happy to knowledge share with you (stdlib support, language differences, macro code, etc) to make your project a success, as it would be a wonderful thing to have a Go target for Haxe.

Let me know if you are interested, feel free to also send me a message here or on the Haxe discord under the same name.

1 Like

Hi

Thanks for offering help

I wish that I wouldn’t the sole person working on the project. (I am not that proficient in haXe internals as well)

Iv’e listened to the VIdeo shooting the moon in haxe, to get an idea.

Here is the fresh Repo

Please comment if any - of course there are many.

Thanks

1 Like

Is the haxe head.threading.Deque essentialy the same a golang buffered channel? or a mpsc in rust?