Passing list of arbitrary function arguments in Haxe
问题 In ActionScript I can use ... in a function declaration so it accepts arbitrary arguments: function foo(... args):void { trace(args.length); } I can then call the function passing an array: foo.apply(this, argsArray); I'd like to call the function with arguments of unknown type and count. Is this possible in Haxe? 回答1: According to the Haxe documentation, you can use a Rest argument: If the final argument of a macro is of type Array<Expr> the macro accepts an arbitrary number of extra