3 ms·
What you're describing is an accidental feature; so far as I know it only exists in Objective-C, and it exists because of a historical accident. Obj-C inherits
by marssaxman 15y ago
What you're describing is an accidental feature; so far as I know it only exists in Objective-C, and it exists because of a historical accident. Obj-C inherits the use of header files from C, but its Smalltalk-derived use of dynamic dispatch means that you can call methods whether or not you have seen a declaration.
Header files don't exist because someone once decided they were a great linguistic idea; they exist because they were a clever hack for making compile-time type checking work across source files on a machine with less than a megabyte of RAM.
Objective-C has had little or no impact on language design. It has been around for over twenty years, but until recently it was just an obscure little branch of the C family tree that never went anywhere. Only after the iPhone took over the world did anyone start to pay attention - but that's because Objective-C is the only way to write iPhone apps, not because everyone suddenly decided the language itself was great.
From a language design point of view, there's not much going on to inspire interest. It's an old familiar way of thinking about objects bolted onto an old familiar way of thinking about systems programming, and what's surprising is simply that it works smoothly despite the awkwardness of the marriage. The language design community isn't really interested in that stuff any more; they've moved on and are all about functional programming and algebraic data type theory now.