On Mon, Dec 20, 2010 at 5:07 PM, Julian Leviston <[email protected]> wrote: > > On 21/12/2010, at 12:00 PM, Steve Wart wrote: > >> I used Objective-C pretty much every day for the past 2 years, but for >> the past 6 months I've been coding in Smalltalk (good old >> VisualWorks/Envy and GemStone) again. Objective-C has a static >> compiler and an interesting runtime (with Smalltalk-like message >> sends), but the compiler and the runtime are very distantly separated >> in time. You use GDB to debug your code. It's not a dynamic language. > > I'm interested in what you mean by dynamic here. > > The fact that I can choose my selectors to send messages with at runtime > would make it dynamic in at least one sense, no?
Sure. It's "duck typing" according to the way most people talk about it these days. To me a dynamic language has runtime access to the compiler, at least to the point you can build a REPL. Objective-C has the potential to take on more of Smalltalk's dynamic features. The Etoile project has some good ideas for integrating libclang into the runtime, so you could fake it out. And since Smalltalk is also faking it at a certain level, it's hard to quibble with smoke and mirrors. > > It's theoretically not dynamically typed, but the "id" type kinda makes it > fairly dynamically typed. > > This wikipedia entry seems to think Objective-C is dynamic. > > http://en.wikipedia.org/wiki/Dynamic_programming_language I never read it. But I don't agree with everything I read either :) The thing about Objective-C is that it's 2 parts, the language and the runtime. A lot of decisions are deferred until runtime, but there's nothing stopping you from sticking 0x0BADF00D into an id pointer and having your program crash. Dynamic languages shouldn't do that. Cheers Steve > > Julian. > _______________________________________________ > fonc mailing list > [email protected] > http://vpri.org/mailman/listinfo/fonc > _______________________________________________ fonc mailing list [email protected] http://vpri.org/mailman/listinfo/fonc
