develooper Front page | perl.perl5.porters | Postings from June 2013

key/value hash and index/valuse array slices syntax

Thread Next
From:
Ruslan Zakirov
Date:
June 3, 2013 12:06
Subject:
key/value hash and index/valuse array slices syntax
Message ID:
CAMOxC8tRxWAjW_bUrCfevKR-Oz+BZMdrm=vaNJChf5aykmxKrg@mail.gmail.com
HI,

I've updated patches that add key/value hash slices to perl syntax:

my %sub_hash = %hash{qw(some keys go here)};

This feature was discussed [1] back in Feb with Brad Gilbert. We agreed
that for consistency this should work with arrays too as index/value array
slice. I've added array functionality. Also, wrote a few basic tests.

Main question is whether should I continue or stop right there as it never
will be in the core?

A quick review of the code [2] would be helpful too.

[1] http://www.nntp.perl.org/group/perl.perl5.porters/2013/02/msg199485.html
[2] https://github.com/ruz/perl5/tree/ruz/kvhslice-op

-- 
Best regards, Ruslan.

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