3 ms·
I love it. Just a few nits -- wording that struck me funny -- all of which are eventually addressed within the article: 1. "An object is a behavior." This is
by dgreensp 12y ago
I love it. Just a few nits -- wording that struck me funny -- all of which are eventually addressed within the article:
1. "An object is a behavior." This is a meaningless or misleading use of "is" to me. I prefer "an X with behavior" or "a thing distinguished by (considered for?) its behavior."
2. The statement that not all Java classes define objects (for example, ones with lots of fields), and that saying this is in keeping with common ways of speaking. No, a programmer would call any object in Java an "object." I get that the point is to say that a struct does not make an object, but the point seemed overstated in that case.
3. Objects must have "recognizable identity," but you don't have to be able to compare the identity of two objects (really it should say two object values or two references). "Recognizing" is being used in a very abstract way here, to avoid invoking state to explain the potential difference between objects. I think it's a little too subtle, even if the point is elaborated on later. If you have any other way to articulate what gives objects identity even if you can't detect it directly, I think it would help. To most readers, I think "recognizing" identity would mean being able to check whether you have a reference to a given object or not, which means being able to compare references. Are there OO languages where you can't? I'm not objecting to downplaying identity.
- abecedarius 12y agoRe 2: I believe he had in mind a class used only to define some static methods. The original OO language, that is the lambda calculus, had no reference comparison -- All You Can Do Is Send A Message is the slogan in general. http://www.erights.org/elib/equality/grant-matcher/history.html http://www.erights.org/elib/equality/grant-matcher/history.h... lists some less familiar ones. Given mutability, identity determines how a message to one object reference affects what happens when you invoke another one. If you go up from the above URL you'll see a bunch more discussion.