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

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

Thread Previous | Thread Next
From:
=?UTF-8?Q?Andr=c3=a9_Warnier_=28tomcat/perl=29?=
Date:
March 11, 2021 17:05
Subject:
Re: Perl feature wish: quote-word array-ref operator
Message ID:
e6ba31c4-5c84-005d-21ac-9d04855d3443@ice-sa.com
On 11.03.2021 14:52, Felipe Gasper wrote:
> 
> 
>> 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.
> 

They probably copied that from perl then. :-)




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