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

Re: De-experimentalising "signatures"

Thread Previous | Thread Next
From:
Yuki Kimoto
Date:
February 15, 2021 01:54
Subject:
Re: De-experimentalising "signatures"
Message ID:
CAExogxOJdQJDExnmZujf4_TMhAF6x5gKmX+QO5iQk2FV-oK08Q@mail.gmail.com
Felipe Gasper

Thank you for JavaScript examples.

-----
> 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
-----



2021年2月10日(水) 23:18 Felipe Gasper <felipe@felipegasper.com>:

>
>
> > On Feb 10, 2021, at 7:25 AM, Paul LeoNerd Evans <leonerd@leonerd.org.uk>
> 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);
>
> Surprise!
>
> -----
> > 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.
>
> -F
>
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About