3 ms·
> Smalltalk lives on in Objective-C :) Not in any way, shape or form. Some of smalltalk's syntax lives in objective-c, but that's it. None of smalltalk's inten
by masklinn 11y ago
> Smalltalk lives on in Objective-C :)
Not in any way, shape or form. Some of smalltalk's syntax lives in objective-c, but that's it. None of smalltalk's intentions or goals do.
- randomsearch 11y ago> Not in any way, shape or form. Some of smalltalk's syntax lives in objective-c, but that's it. None of smalltalk's intentions or goals do. So, in some way, shape, or form, then. No need to be so extreme.
- EliRivers 11y agoFor me, the most Smalltalk-like aspect of it was that I could send any message to any object. This was radically unlike, for example, C++, where I could only call functions on objects when those functions actually existed. What I'm really saying here is that I disagree with you, and I believe you are incorrect in stating that none of Smalltalk's objectives live on in Objective-C "in any way, shape or form", and that's an example of something from Smalltalk that lives on in Objective-C.
- segmondy 11y agoYou can do the same in ruby, or with lisp. Objective-C doesn't provide a REPL for constant feedback, you find that in ruby, lisp and python. It lives more in those languages than in ObjC.
- david-given 11y agoI don't know Ruby or Lisp, but Python, at least, doesn't like it if you call methods on nil. Smalltalk and Objective C both let you do that (they do nothing and return nil).
- dragonwriter 11y agoIn Ruby, nil is the singleton object of NilClass, and you can call method on it like any object -- heck a key way of distinguishing it from False is that they respond differently to .nil?
- masklinn 11y ago> I don't know Ruby or Lisp, but Python, at least, doesn't like it if you call methods on nil. That's false. Python likes it every bit as much as if you call methods on any other object: it works fine if you wall a method which exists on the object, raises an AttributeError if you try to access an attribute which does not exist and raises a TypeError if you try to call an attribute which isn't callable. >>> None.__hash__() -9223372036578437293 > Smalltalk let you do that (they do nothing and return nil). That is also false. While UndefinedObject responds to a fair number of messages (compared to NoneType anyway), sending an "unknown" message to `nil` will signal an exception as it would just about anywhere else (because it'll defer to the standard Object implementation of #doesNotUnderstand). You can redefine `UndefinedObject doesNotUnderstand` so that it does something (or does nothing and return `nil`), but that definitely isn't the default behaviour, and it isn't generally considered a good idea.
- david-given 11y ago>> Smalltalk let you do that (they do nothing and return nil). > That is also false. Oops, you're absolutely right --- I was thinking of Objective C: http://stackoverflow.com/questions/156395/sending-a-message-to-nil http://stackoverflow.com/questions/156395/sending-a-message-...
- EliRivers 11y agoI knew I'd read something on the subject. Brad Cox, in his book "Object Oriented programming", discusses the influence Smalltalk-80 had on how he designed Objective-C, when he was creating it. From the opening of chapter four, "Objective-C implements the dynamically bound style of object-oriented programming used in Smalltalk-80 as a set of extensions to a conventional base language, C." Smalltalk-80 gets a lot more discussion, and there is a lot more about the influence of Smalltalk-80. My copy was printed in 1986, when the programming world looked very different, but from his own words it's pretty clear that something of Smalltalk is very much in Objective-C.