Live data from Hacker News

Apple's new Objective-C to Javascript Bridge

steamclock.com

41–50 of 110 posts

Re: Apple's new Objective-C to Javascript Bridge

#41
post #26

> The most interesting possiblility would be that this is the start of Apple’s evolution away from Objective-C into promoting a higher-level language for their platform 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++ base…

Maybe I've just swallowed the Kool-Aid, but I don't see the putative benefits of Apple's switching platforms. I'm also not clear on how many people there are who a) can write non-trivial software and b) can't learn a C derivative language who c) would actually write software for Apple's platforms. It just seems like a pretty small set. And, if Apple were to switch, why would they pick a language as shitty as Javascri…

I think it's less a specific shift to JS, but more a shift to HTML5 and CSS3. That would probably be a better reason to allow people to write JS apps.

Re: Apple's new Objective-C to Javascript Bridge

#42
post #40
post #26

Earlier quoted context omitted.

Maybe I've just swallowed the Kool-Aid, but I don't see the putative benefits of Apple's switching platforms. I'm also not clear on how many people there are who a) can write non-trivial software and b) can't learn a C derivative language who c) would actually write software for Apple's platforms. It just seems like a pretty small set. And, if Apple were to switch, why would they pick a language as shitty as Javascri…

Wait, don't you remember Steve's original announcement about the great development opportunities on iPhone, where you could use HTML and Javascript? You won't be able to use undocumented APIs because you won't be able to get to them.

I was working on software for the phone at the time, so, yeah.

Re: Apple's new Objective-C to Javascript Bridge

#43
post #41
post #26

Earlier quoted context omitted.

Maybe I've just swallowed the Kool-Aid, but I don't see the putative benefits of Apple's switching platforms. I'm also not clear on how many people there are who a) can write non-trivial software and b) can't learn a C derivative language who c) would actually write software for Apple's platforms. It just seems like a pretty small set. And, if Apple were to switch, why would they pick a language as shitty as Javascri…

I think it's less a specific shift to JS, but more a shift to HTML5 and CSS3. That would probably be a better reason to allow people to write JS apps.

That's even less explicable.

Re: Apple's new Objective-C to Javascript Bridge

#44
post #26

Earlier quoted context omitted.

Maybe I've just swallowed the Kool-Aid, but I don't see the putative benefits of Apple's switching platforms. I'm also not clear on how many people there are who a) can write non-trivial software and b) can't learn a C derivative language who c) would actually write software for Apple's platforms. It just seems like a pretty small set. And, if Apple were to switch, why would they pick a language as shitty as Javascri…

Closures + Lexical Scoping + Prototypical Inheritance makes for a pretty great language IMHO.

Those things are indeed nice, but they can't defend against the other insanities that come in the box with them.

Re: Apple's new Objective-C to Javascript Bridge

#45
post #2

My guess is that this would be fast enough to build almost any Mac app and many iOS apps. The bigger question for me is, how gross would it be to deal with the "Objective-C-ness" of the Cocoa APIs through JavaScript?

On iOS it won't be that quick: you don't get anything more than the JS interpreter, as you cannot allocate any executable memory on iOS, so any JITing compiler is out of the question.

Wouldn't this be exempt from that limitation, with the JavaScript engine being distributed as part of iOS itself?

Re: Apple's new Objective-C to Javascript Bridge

#46
post #2

My guess is that this would be fast enough to build almost any Mac app and many iOS apps. The bigger question for me is, how gross would it be to deal with the "Objective-C-ness" of the Cocoa APIs through JavaScript?

It's important to remember that Apple shipped both the Ruby and Python Objective-C bridges in ~10.5 era OS X. You can (and I have) written OS X native software in Python; it wasn't super pretty, but the concepts mapped across reasonably well.

So I wouldn't take this as necessarily the sign of a shift in anything.

Re: Apple's new Objective-C to Javascript Bridge

#47
post #35
post #32

Earlier quoted context omitted.

I actually like Javascript. Sure it has some warts. But it has an elegance I've really only seen in Javascript, Lua, and Lisp.

You last sentence is a bit far-fetched.

The referred sentence is a matter of opinion, so it's a bit far-fetched to say it's a bit far-fetched, IMO. From what I know of Lua, it's fairly tiny, and it has ready access to its own meta-level -- to the point where there can be a blurring of programming and meta-programming. Instead of everything "being an Object," everything is in a table. Just rename "table" to "object" and call it a prototypical day.

Re: Apple's new Objective-C to Javascript Bridge

#48
post #44

Earlier quoted context omitted.

Closures + Lexical Scoping + Prototypical Inheritance makes for a pretty great language IMHO.

Those things are indeed nice, but they can't defend against the other insanities that come in the box with them.

Only a subset of Javascript is useful, just like how only a subset of C++ is useful, just like how only a subset of Objective-C is useful, just like how only a subset of Haskell is useful, ...

Re: Apple's new Objective-C to Javascript Bridge

#49
post #26

> The most interesting possiblility would be that this is the start of Apple’s evolution away from Objective-C into promoting a higher-level language for their platform 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++ base…

Maybe I've just swallowed the Kool-Aid, but I don't see the putative benefits of Apple's switching platforms. I'm also not clear on how many people there are who a) can write non-trivial software and b) can't learn a C derivative language who c) would actually write software for Apple's platforms. It just seems like a pretty small set. And, if Apple were to switch, why would they pick a language as shitty as Javascri…

No, your language is shitty!

Re: Apple's new Objective-C to Javascript Bridge

#50
post #22

great for people wanting to script games and don't want to get into LUA :)

> great for people wanting to script games and don't want to get into LUA :)

Beware of people who are portraying themselves as "savvy" yet don't know how to spell Lua.

Post reply on HN