6 ms·
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 syn
by mr_dbr 17y ago
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):
notificationCenter.addObserver_selector_name_object_(
notificationHandler,
"handleMountNotification:",
NSWorkspaceDidMountNotification,
None)
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
- dchest 17y agoMacRuby: notificationCenter.addObserver(notificationHandler, selector:"handleMoundNotification", name:NSWorkspaceDidMountNotification, object:nil)
- azirr 17y agoYes, 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