http://www.perlmonks.org?node_id=836050


in reply to Re: Avoiding compound data in software and system design
in thread Avoiding compound data in software and system design

Howdy!

Those are all red herrings.

Hashes are not scalar data; they are a collection of values indexed by key. Hashes using the old sub-key thingy that predated references would be an example, but not because they are hashes.

The scalar data types are usefully atomic. If you need to work with the sub-parts of the underlying representation, you get to disassemble them yourself. Strings, per se, are only compound insofar as you define the values to be so and need to work with individual parts. Objects, more or less by definition, *can* have numerous attributes, but the parts are explicit and individually addressable (for most sane implementations).

I see the point; it needs to be applied judiciously.

yours,
Michael