Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Avoiding compound data in software and system design

by herveus (Parson)
on Apr 21, 2010 at 12:54 UTC ( #836050=note: print w/replies, xml ) Need Help??


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
  • Comment on Re^2: Avoiding compound data in software and system design

Replies are listed 'Best First'.
Re^3: Avoiding compound data in software and system design
by ikegami (Pope) on Apr 28, 2010 at 18:11 UTC

    The string scalarDSN data type is usefully atomic. If you need to work with the sub-parts of the underlying representation, you get to disassemble them yourself.

    Seeing as you can swap in DSN for a scalar data type, what you said of scalar data types applies to DSNs as well.

    By your logic, the problem isn't the compoundness of DSNs, it's the lack or perceived lack of tools to manipulate DSNs.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://836050]
help
Chatterbox?
[Discipulus]: good morning monks! town holiday here.. but super busy
Discipulus time is not comarable with money.. when you have a roof and something to eat
[Corion]: Hi Discipulus! Busy making the town better? ;)
[Discipulus]: the house I hope.. now i'm going on the roof putting some protection for the sun. afternoon 150 km for a water polo training (son, obviously..)
[Corion]: Discipulus: Ah - lazy roof-sitting ;)
[Corion]: (well, after you've put on the sun protection ;) )
[Corion]: But I should be moving into town as well, do some chores and get my hair cut...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2017-06-29 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (655 votes). Check out past polls.