11 ms·
What you're missing is that, in Smalltalk, the representation on which you're acting is indistinguishable from the object; in your example, when you change the
by aaronem 13y ago
What you're missing is that, in Smalltalk, the representation on which you're acting is indistinguishable from the object; in your example, when you change the name member, Bob from Accounting's name does suddenly change to Gary; not only do future accesses of the name member on that object return "Gary", but, for example, if you have an HR management frontend open on Bob when you make the change in the inspector, you'll instantly see the effect there as well.
If all your experience and knowledge is born of Unix and the web, you don't really have available the necessary concepts to think about how a Smalltalk, or even a Lisp, actually works -- I know this because all of my experience and knowledge were born of Unix and the web, until recently, when I took it into my head to learn Lisp and also to gain at least a passing familiarity with Smalltalk. The difference is amazing -- in the preface of the UNIX-HATERS Handbook, written mostly by veterans of the Lisp years at SAIL, our modern computing environment is described thusly, by Ken Pier of Xerox PARC:
"I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act."
Which I thought was hyperbole, too, until I spent some time discovering what sort of environment Pier and the SAIL folk took for granted. I don't unreservedly recommend the experiment; I earn my living in Pier's "East Africa", and sometimes I think I'd be better off if I didn't know how bad I have it. But I can certainly say that if you haven't tried it for yourself, you don't begin to know what you're missing.
- rprospero 13y agoI understand that changing the name member of the Bob object to Gary will cause it to be Gary in every subsequent member access. Perhaps I've grown spoiled in my old age, but I'd be shocked at any system which didn't have this property. However, if I called out "Hey Gary!" down the hall, would he respond? Would his driver's license still read Bob? The last time that I tried to learn Smalltalk, it was drilled into me that Smalltalk works directly with objects and not just their representations. For instance, the collection of black pixels on the screen was the Mouse object itself and not just a manifestation of a Mouse object somewhere in memory. A large amount of my confusion has possibly come from those lessons. I agree that Lisp is an enlightening experience. I spent two years using Scheme as my primary programming language at work. Then again, I may just be stuck as a Blub programmer. I spent a year focused on Common Lisp, but never found any use for SLIME, despite using Emacs exclusively.
- aaronem 13y ago> However, if I called out "Hey Gary!" down the hall, would he respond? Would his driver's license still read Bob? Yes and no, respectively. Perhaps a heavily contrived example might help: Consider a system in which there is exactly one representation of an object member's value, which is stored in that object; when you call an accessor method, what you actually get is a reference, which is instantiated with an observer attached that listens for a notional "change" event, fired whenever the referred value is modified, and whose event handler updates whatever context exists around the reference, regardless of its nature, so that the displayed value matches that newly assigned to the object member. ...and now perhaps you can see why people familiar with Smalltalk think so highly of it; what in, for example, Javascript, would require an enormous amount of manual infrastructure and completely fail to generalize, in Smalltalk happens entirely transparently. It's not so much that you don't have to think about it; it's that there's nothing there to think about. > I spent a year focused on Common Lisp, but never found any use for SLIME, despite using Emacs exclusively. And now you've lost me. How can this possibly be the case? What was your Lisp workflow like? I mean, I can understand not getting the appeal of Lisp if you're just talking to the REPL and not working in an actual Lisp environment of the sort you get with Emacs Lisp or SLIME, but I have trouble understanding how anyone could work with those tools for a year without recognizing their potential.