HaxeFoundation / HaxeManual

The official Haxe manual
https://haxe.org/manual/
Creative Commons Attribution 4.0 International
221 stars 153 forks source link

Added overload and rest arguments section #496

Open MrcSnm opened 2 years ago

MrcSnm commented 2 years ago

Added function overload Added function rest arguments

Geokureli commented 2 years ago

Everyone in the haxe discords is losing their shit because no one knew these were possible. Why was this not documented?

RealyUniqueName commented 2 years ago

Rest arguments section needs a link to or at least a mention of haxe.Rest API

MrcSnm commented 2 years ago

Rest arguments section needs a link to or at least a mention of haxe.Rest API

I added that and a notice that it is also possible to use spread operator too.

RealyUniqueName commented 2 years ago

@Simn is that enough for overloading?

Simn commented 2 years ago

No, this needs a more elaborate introduction to clarify that we don't support full overloads and such things. The documentation for this has to be approached differently, so I suggest that we split up the PR accordingly.

MrcSnm commented 2 years ago

No, this needs a more elaborate introduction to clarify that we don't support full overloads and such things. The documentation for this has to be approached differently, so I suggest that we split up the PR accordingly.

I would split that PR if it is accepted for the rest arguments.

That apart, I think having to extern inline overload ( and that has bits of explanation about what each keyword is doing ) pretty surely means that overload is not fully supported.