in reply to Array vs. Hash for sparsely integer-indexed data

You could tie an array to a hashref for storage. This would be lovely in terms of memory usage, but not especially performant.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
  • Comment on Re: Array vs. Hash for sparsely integer-indexed data