|
![](/i/fill.gif) |
This is why I don't mind an OO language where every object is a reference
object. Most of what I do that needs OO is this sort of programming.
http://msdn.microsoft.com/en-us/magazine/dd419654.aspx
(DDD is pretty common, not just Microsoft stuff, so it has wikipedia pages
and stuff. This just happened to be a decent explanation link.)
So objects that have an identity are always unique, and objects that aren't
unique are value objects that are read-only (so it doesn't matter if they're
values or references).
I actually have a pretty hard time coming up with a class I think should be
both read/write and copyable, at least without some custom "clone" function.
Maybe something internal to the design,like an iterator, but needing to
explicitly copy such a thing doesn't seem like a bad idea to me.
--
Darren New, San Diego CA, USA (PST)
There's no CD like OCD, there's no CD I knoooow!
Post a reply to this message
|
![](/i/fill.gif) |