The thing is: Why would they want to transform away? As it is now Obj-C is pretty sane. The memory management is now a non-brainer so that even people who come from managed languages can grasp it. GCD is great for concurrency. And using C and C++ based 3rd party libraries is trivial.
The existing developer base is fine with Obj-C.
So maybe Apple wants to attract new developers? But why now? If they really wanted to attract new developers to their platform they would have chosen a different language for the iPhone SDK back when they released it first. But nowadays Apple's platforms have more than enough developers.
But the truth is probably that whether or not someone can develop non-trivial software with any roughly equivalent language is mostly a function of available time to ramp up vs spend on other things. So, sure, Obj C and JS are close enough that anybody who can develop non-trivial software in one can probably do it in the other... but it's still going to be a time investment while you learn how things are done in the language and various associated APIs.
I don't know if Apple particularly cares if they're pulling in more developers. If they do, though, adding another language that many developers already know makes sense. It reduces the friction involved.
On top of the widespread at-least-shallow familiarity, not everyone shares this opinion.
Also, this is unlikely to be a "switch." It's more likely to be a gateway.
C? Buffer overflows, manual memory management, header files, severely lacking standard libraries, crap support for most modern idioms, etc etc.
C++? Tons of edge cases, template madness, unbelievable large language spec, etc etc.
Python? Python 2 - 3 dichotomy, crappy concurrency / parallelism support, , strict on whitespace, standard libs in various stages of cruft and abandonment, no proper closures, CPU bound for lots of interesting problems necessitating bilingual development with C extensions or the use of hacks such as Cython etc.
You can find a similar list for everything, from Lisp to Haskell.
A huge install base, huge number of programmers, easy syntax, powering the internet, lispy-flexibility, and the fastest interpreters this side of the JVM are enough benefits to counter some crappy coercion rules and FP only math bizarreness.
It would take a bit more to convince me that this kind of language is suitable for larger-scale projects - this based on my experience with pretty much any language that isn't statically typed - but this would at least remove one obvious type of error without impinging too much on what people appear to see as their freedoms.
I don't recall seeing this mentioned anywhere. Perhaps the still-imperfect browser support puts people off.
Actually the ObjC runtime is amazingly powerful and dynamic, as if it was made for a better language (e.g. can handle dynamism of Ruby http://macruby.org/)
- Modules? Yup
- Maps and Sets? You bet.
- Tail call optimizations? Sure
- Classes? Finally!
That's not to suggest that a single iteration will magically fix all of its quirks and shortcomings. However, one possibility could be that Apple picked JS, not on it's checkered history, or the fact that it is popular amongst web developers today, but where it is headed tomorrow and how it could be adopted and adapted.
It is also advisable to taboo projecting your own experience/thoughts onto another, as if that is his/her experience/thoughts, as well.
> It is also advisable to taboo projecting your own experience/thoughts onto another, as if that is his/her experience/thoughts, as well.
I disagree with that take. Personal experiences can lend themselves to evaluating context. Humans do it all the time.
If one is going to make an argument that something is "silly", and provides barley more than nil context to that argument ("enough to know"), then a context vacuum exists. If the OP isn't going to provide it, then someone else will.
You won't be able to use undocumented APIs because you won't be able to get to them.
GCD is amazing and I use it more than NSOperation for easy quick off stuff.
That being said, I can see how this would be useful for gamedevelopers who wanna keep their scripts in JS/CoffeeScript instead of LUA :-)
Because it's popular.
Maybe Apple out of the goodness in their heart decided to make this easier, but I'm skeptical.
The fact that it's a refactoring (even a very nice one, as it seems to be) rather than a brand new API does make it less likely that Apple has any particular future plans for the API, which in turn make much of the speculation in the post even more speculative. I'm going to make an update to the post with a link to WebScript as well as a bit of additional commentary.
var userName = userNameTextfield.getText();
var helloMsg = "Hello " + userName;
I am currently working on integrating such piece of code into some of my apps and have them released on the AppStore. In fact if anyone good in JS is interested I would really appreciate some help to get that bridge off the ground since I truly believe there is a lot of great opportunities with a JS bridge to ObjC that respect all iOS rules.
My contact info are my HN profile.
Edit: minor typo fixed
I'd like to see that rule change, someday. Exposing this Objective-C API in a future iOS release isn't going to change the status quo.
 - http://developer.apple.com/library/mac/#documentation/Carbon...
 - http://impactjs.com
 - https://developer.apple.com/appstore/guidelines.html
Should make it easier for developers to build their own middleware platform without getting too deep into reams of C boilerplate.
 - https://developer.apple.com/library/ios/#documentation/Cocoa...
In Foundation, [NSBundle mainBundle] returns a reference to an object representing your application's root directory, and the code and resources found within. Roughly the same bits that you'd find within an unpacked IAP file.
Speculation is my own, derived from: http://oleb.net/blog/2012/10/remote-view-controllers-in-ios-...
So I wouldn't take this as necessarily the sign of a shift in anything.
They were able to solve this in C by inventing Blocks and GCD.
It's not as good as Hypercritical, but is better than nothing!
That seems like an enormous leap of speculation.
It's only interesting because Apple is officially doing it themselves.
Does this bridge help fix that?
This is how most of the other full feature bridges work, PyObjC, RubyCocoa/MacRuby, LuaCocoa. Otherwise you are hamstrung anytime you need to deal with something like a C struct (e.g. NSPoint).
You don't necessarily need BridgeSupport to call out to Objective-C.
Speaking of BridgeSupport, does anybody know where the most recent source code for that project went? It seems to have been removed from Apple's Mac OS Forge after Laurent Sansonetti left Apple. A shame.
 - For example, http://merbist.com/2011/02/19/bridgesupport-build/ . The chapter referenced from O'Reilly's excellent MacRuby book does a better job of explaining the whole process.
While it is possible to workaround the lack of BridgeSupport, if Apple doesn't supply it, most developers are not going to go through the effort of using it. And if Apple doesn't supply it on iOS, they aren't going to make life nice for developers doing this (continue bans on dynamic libraries for loading the .dylib containing missing symbols, on mprotect which is horribly useful for things like subclassing and block generation and JIT).
I don't know where the source went. I'm sad to hear that. If you find a copy, let me know.
Which he found from a really neat looking archive for popular open source projects, at that. Bookmarking.
Just made a few fixes to get the BridgeSupport framework to compile on 10.8. Might issue a pull request.
That's so often just about outward signs. Programming is complicated, and the fields of programming and Computer Science are vast. If you're not aware of how miniscule a sliver of the whole thing you command, odds are you're just another unwitting Dunning Krueger victim.
Don't judge a language by what you find strange. Don't judge a language just because it wouldn't suit what you do. Figure out what makes it powerful and why it works. Until you do that, please just shut up and don't add to the noise.
How much longer until we can develop native applications without Objective-C entirely?
A polygot/trans compiler for xcode would make me melt.
You already can --
Lua: LuaCocoa, LuaWax, TLC
"It's like lisp!"
"No they aren't!"
"YES THEY ARE"
Beware of people who are portraying themselves as "savvy" yet don't know how to spell Lua.