News for hackers. Stuff that matters.
Re:Extracting Immutable Objects by benjiweber on Sunday March 08, 2015 @04:06AM (#9164974)
Most seem like Value Objectshttp://martinfowler.com/bliki/ValueObject.html

I usually find there are several value objects for every entity https://dddsamplenet.codeplex.com/wikipage?title=DDD%20build...

Re:Extracting Immutable Objects by ExpiredLink on Sunday March 08, 2015 @07:33AM (#9165279)
'Value Object' and 'Immutable Object' are a contradiction in terms. Immutability refers to values, not 'objects'.
Re:Extracting Immutable Objects by benjiweber on Sunday March 08, 2015 @08:06AM (#9165324)
Not sure what you are getting at. I assume you are using a specific definition of these terms from a particular domain?

Immutable is just a word that means unchanging, as in "immutable laws of nature". . Consequently Objects can be immutable if they cannot change after creation. This seems a pretty commonly held view http://en.wikipedia.org/wiki/Immutable_object

How would you define Objects and Values?

Re:Extracting Immutable Objects by noblethrasher on Sunday March 08, 2015 @11:38AM (#9165891)
An object has state by definition.

More to the point, an object has agency: It gets to decide how to interpret messages sent to it (this is why we say that putting setters on classes turns objects back into mere data structures [1]).

http://www.devx.com/enterprise/the-vision-of-kay-and-fieldin... (right after the seventh paragraph)

Re:Extracting Immutable Objects by ExpiredLink on Sunday March 08, 2015 @04:26PM (#9167086)
The classic paper is "Values and objects in programming languages" by B. J. MacLennan.

https://www.google.com/search?as_q=MacLennan+Values+and+Obje...

Re:Extracting Immutable Objects by rianjs on Sunday March 08, 2015 @11:21AM (#9165822)
An object can be a value object, and it can be immutable. Or not. (Though I can't think of a reason a value object should ever be mutable once it's created; it would be a very pungent code smell.)

These are orthogonal ideas; not contradictory ones.

Re:Extracting Immutable Objects by Harkins on Sunday March 08, 2015 @11:45AM (#9165916)
(blog author here, very surprised to see my old post show up)

Yeah, I think of all of these as value objects, and DDD was also a large part of my inspiration for this series of posts. This code eventually rolled into a RailsConf 2015 talk: http://railsconf.com/program#prop_1132