Re:Objective-C's niche: why it survives in a world of altern...
by mr_dbr on Monday October 12, 2009 @04:19PM
(#877544)
Good or bad, I'd say Apple are pretty much stuck with ObjC. Cocoa and all the other frameworks OS X uses are written like they are because of the language's syntax. This is demonstrated by how crappy the PyObjC code looks (compared to "regular" Python):
To make it work with some other language (say, C#/C++/Ruby/Brainfuck/Python or whatever) would basically be a complete redesign of the framework, which in turn would basically be a complete redesign of OS X.. And why? Objective C is a perfectly decent language.. I'm not sure anyone would be using it where it not for Carbon/Cocoa, but it's not a bad language at all
[ Parent
| on HN ]
Re:Objective-C's niche: why it survives in a world of altern...
by dchest on Monday October 12, 2009 @06:28PM
(#877810)
MacRuby:
notificationCenter.addObserver(notificationHandler,
selector:"handleMoundNotification",
name:NSWorkspaceDidMountNotification,
object:nil)
Re:Objective-C's niche: why it survives in a world of altern...
by azirr on Tuesday October 13, 2009 @06:19AM
(#878765)
Yes, the messaging syntax (which is very expressive) makes it hard to use other languages with Cocoa, but not all. Your example in F-Script gives:
notificationCenter addObserver:notificationHandler
selector:#handleMountNotification:
name:NSWorkspaceDidMountNotification
object:nil