develooper Front page | perl.perl5.porters | Postings from December 2018

Re: [perl #133712] Confusingly, perlref calls a hash in the examples%array

Thread Previous | Thread Next
David Nicol
December 6, 2018 17:28
Re: [perl #133712] Confusingly, perlref calls a hash in the examples%array
Message ID:
On Thu, Dec 6, 2018 at 3:57 AM Dave Mitchell <> wrote:

> I should imagine it's because until perl 5, hashes were called associative
> arrays, and therefore using 'array' as the name for one of them was
> reasonable at the time. I see no reason not to apply this patch.

That's what we called them in data structures class at university.

Hash is either cannabis or corned beef and spuds, and the fact that Perl
implements its associative arrays with hash tables is an implementation
detail: the interface would be just the same were they binary trees or
something else.

Associative arrays are called variously "maps" or "dictionaries" in the
nomenclature of other programming languages.

I guess I'm arguing to leave it alone, so we've got an example of calling
an associative array %array. It also drives home the point that the
differentiator is the sygill not the name.

"I don't know about that, as it is outside of my area of expertise." --
competent specialized practitioners, all the time

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About