NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Data? (Score:1)
I think OO is about the behavior of models. Why do you think it's about data?
Re: (Score:1)
Well, I was really thinking of Steve Yegge's rant on nouns vs. verbs [blogspot.com].
In OO every class is really a 'data type'. Even in perl where there are no types :). The essence of OO is to have an object, say $obj, that is data of some type and to have methods that act upon that data: $other_obj = $obj->transform.
Sure you can have objects that don't 'contain' any data and only methods. But you end up with an ugly looking model, IMH
Re: (Score:1)
Not the way I write code. If I can create classes without data, I do. (Of course, I've also argued If we can solve problems without computers, perhaps we should. [oreillynet.com])
Re: (Score:1)
Re:Data? (Score:1)
It is, only in the same way that a function is just a
jmp/retpair. From the external point of view, a class is just a collection of behavior, not data. That's the important point.Reply to This
Parent
Re: (Score:1)
On the other hand TechWeb says:
But the whole thing seems confused, the wik
Re: (Score:1)
Thanks! I have had roles banging around in my head for a bit over three years now.