Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Sorry, but this smacks of: I just got bitten by something, so now I'm gonna demonise itYes, it's called evolution. Intelligence is the ability to identify, formulate and resolve problems. So this post was made to identify and formulate a problem in hopes that it is not repeated. And yes, I did get bitten by the DBI API and now I have to go redo something so it works with Rose. Continuing, Let me present the definition of compound data to you once again: A compound datum is an apparently atomic data item that it really not atomic. Are hashes evil? They consists of keys and values.evil? You brought demons in the picture, not me. The point at hand is "apparently atomic". they are not apparently atomic. you dissected hashes into their parts yourself. Now, if instead of this hash: You did this: my $vals = "a:1,b:2" then you would have an apparently atomic data item that it really not atomic, because you would have to do string-twiddling to extract relevant subparts. Floats? Exponent and characteristic.Seems atomic to me. And the subparts you mention, can they be easily accessed/used? Integers? Magnitude and sign.or 32 bits (grin). ah, perfect decomposition! My post did not say it listed all examples of compound data. And if there are more, then fine. Besides, the focus was on software and system design, not language elements. Bytes? Many bits.Again, complex data is not 'compound data'. Compound is a specific term referring to a specific mistake in software and system design. Strings?Yes, they are complex, but only compound when mis-used. Objects? ...Yes, an object is atomic, not apparently atomic. It may have subparts, but each has a well-defined means of accessing/changing it. I can't use my new vacuum cleaner in it's box, but I'm glad it came in one.You are confusing a complex of objects with compound data. The vacuum cleaner's relation to the box was meaningful and useful. Packing multiple datums into a string is counter-productive to flexible software and system design as was demonstrated. The mantra of every experienced web application developer is the same: thou shalt separate business logic from display. Ironically, almost all template engines allow violation of this separation principle, which is the very impetus for HTML template engine development. -- Terence Parr, "Enforcing Strict Model View Separation in Template Engines" In reply to Re^2: Avoiding compound data in software and system design
by metaperl
|
|