[Pas2js] Possible feature? keep the original JS overload behavior

silvioprog silvioprog at gmail.com
Fri Dec 21 19:19:50 CET 2018


On Fri, Dec 21, 2018 at 3:08 PM Michael Van Canneyt <michael at freepascal.org>
wrote:

> I think that should be possible, but only for external functions.
>
> Michael.


sorry, but it sounds very strange for me:

function foo; varargs 2; ...

I never saw a compiler/language limiting the arguments in a variadic
function, but ... 😀

And, as I said, the problem I showed is not variadic situation, because all
parameters are named. The problem is just because, by default, the
transpiler pass the values of the default parameters to the generated code,
but it would be nice to change this behavior via some compiler option.

I probably will change my transpiler copy allowing to omit the default
parameters in the generated script. 😅

-- 
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20181221/acf2df40/attachment.html>


More information about the Pas2js mailing list