One thing that many Java developers that I work with think is weird is that I speak in first-person for my objects. For example:
"I should calculate the total when given a new line item"
"...that is not my responsibility..."
I act like I am the object. It's so natural to me that I don't even think about it. Now, this is very common when designing with other Smalltalkers as well. Are we the only ones that do this? And if so why? Is it because we are behavior-ists (ala Wirfs-Brock) and not data-ists? I don't know, but I think it's funny and it's what makes being a Smalltalker a joy.
Wednesday, November 22, 2006
Subscribe to: Post Comments (Atom)
If I am an object, then it is more likely that I will give orders. This has a tendency to shifts the point of view towards dictatorship --- most unfortunate.
Not if I'm a lazy object...=)
Tendency, my friend... tendency. Not always :).
Other than that, I've come to dislike putting myself in the place of the object. I think we'd be better off writing code in the third person... the object will do this, whatever message will be sent... much better. Then we're not in the picture, and it's easier to avoid getting too attached to things.
I prefer the 3rd person tone.
"Removes anObject from the receiver."
Post a Comment