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

Re: Perl feature wish: quote-word array-ref operator

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
March 11, 2021 13:52
Subject:
Re: Perl feature wish: quote-word array-ref operator
Message ID:
B08B6661-3CE0-4055-8060-A01E5311E491@felipegasper.com


> On Mar 11, 2021, at 5:13 AM, André Warnier (tomcat/perl) <aw@ice-sa.com> wrote:
> 
> On 11.03.2021 09:29, Alexander Hartmaier wrote:
> [...]
>> What I hate about quoting in Perl in general is that it doesn't allow to use the dash! my %hash = ( foo-bar => 'baz' ); doesn't work and needs to be quoted.
> 
> In all other languages that I know of, you would *always* need to quote literal keys and values, when you fill a hash :
> 
> %hash = ( 'foobar' => 'baz' );

JavaScript doesn’t make you quote dict/object keys, FYI. I think they quotes are optional in TypeScript as well.

-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