HaxeFoundation / HaxeFoundation/haxe
How to create "something like haxe.PosInfos" yourself?
Open
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
I would love to see the possibility of adding user-defined types like `haxe.PosInfos` that allow you to generate some value if none is provided.
It might look something like this:
`abstract Foo(String) {
public function new(s) this = s;
@:default macro static function make() {
return macro new Foo('foofoo');
}
}`
This is a silly example of course, but more complex macros could gather call site information and what not.
Contributor guide
Assessment
This issue has not been assessed yet.