develooper Front page | perl.perl5.porters | Postings from February 2021

Re: De-experimentalising "signatures"

Thread Previous | Thread Next
Felipe Gasper
February 10, 2021 14:18
Re: De-experimentalising "signatures"
Message ID:

> On Feb 10, 2021, at 7:25 AM, Paul LeoNerd Evans <> wrote:
> Now I admit I don't know JavaScript, but it would surprise me if you
> didn't get any sort of runtime error when trying to call either of
>  func(1);
>  func(1,2,3);


> node -e 'function foo(bar, baz) { console.log(bar, baz) } foo(1, 2,3)'
1 2

> node -e 'function foo(bar, baz) { console.log(bar, baz) } foo()'
undefined undefined

This, though, is something that in my experience JS devs widely regard as a defect in the language. TypeScript exists--and is popular--largely *because* it provides more such strictures.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About