POV-Ray : Newsgroups : povray.off-topic : Another "This is why I..." : Another "This is why I..." Server Time
5 Sep 2024 19:27:40 EDT (-0400)
  Another "This is why I..."  
From: Darren New
Date: 26 May 2009 16:22:10
Message: <4a1c4f72@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.