You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which is sort of okay, but less so if the resulting API is intended to be bearable to work with and multiple functions spot a multitude of optional parameters for convenience (which, in this case, becomes inconvenience, as they have to be filled out at all times).
It would be nice if HXCS could generate overloaded function copies with optional parameter values inserted, i.e.
It is possible to accomplish both approaches on per-project basis by creating those extra functions by yourself (either manually or via macro) and renaming them to become overloads via the @:native metadata, but, as you can guess, this can get a bit quirky.
Have a nice day.
The text was updated successfully, but these errors were encountered:
Current workaround macros, should anyone need it: https://gist.github.com/anonymous/4837c6dd39e56b1ffe28
(untyped __cs__ due to fact that I've no idea how to get function arguments to work while using haxe.macro.Context.parse)
Hi. This is a question regarding use of HXCS for generating code for use from C# codebase.
Currently,
produces code like so:
Which is sort of okay, but less so if the resulting API is intended to be bearable to work with and multiple functions spot a multitude of optional parameters for convenience (which, in this case, becomes inconvenience, as they have to be filled out at all times).
It would be nice if HXCS could generate overloaded function copies with optional parameter values inserted, i.e.
Or at least generate small overload functions that call the main function with the optional parameters filled out,
and leave inlining to JIT.
It is possible to accomplish both approaches on per-project basis by creating those extra functions by yourself (either manually or via macro) and renaming them to become overloads via the
@:native
metadata, but, as you can guess, this can get a bit quirky.Have a nice day.
The text was updated successfully, but these errors were encountered: