3 ms·
There is also a very common two-liner invocation that turns them into prototypical classes as well. Extremely versatile data structure (pejorative).
by giraffe_lady 2y ago
There is also a very common two-liner invocation that turns them into prototypical classes as well. Extremely versatile data structure (pejorative).
- ramses0 2y agoPerl would like to have a word... ;-) But seriously, they do have some interesting quirks which make sense if you think of it (and maybe Lua as a semi-contemporary got its ideas from there), specifically, hashes are pairs of keys (even/odd) in a flat array... and of course objects are just key/values, but with some values being names and functions... https://perlmaven.com/creating-hash-from-an-array https://perlmaven.com/creating-hash-from-an-array