Live data from Hacker News

Could Ruby be Apple's language and API future?

parveenkaler.com

31–40 of 80 posts

Re: Could Ruby be Apple's language and API future?

#32
post #13

I can't really see Apple doing this, if for no other reason than Objective-C is something they can control, and Ruby isn't. If the core Ruby developers decide they want to add more features, change the language's underpinnings, etc. Apple's left to play catch-up. If Apple wants to add features, then they basically have to fork the language and hope their changes get merged in. Apple's shown (and been shown) how much…

So? Apple didn't control GCC, either, when they built OS X on top of it.

Re: Could Ruby be Apple's language and API future?

#34
post #3

This would be all kinds of awesome, but I think it's probably a dream. To leap from ObjC to Ruby would be a absolutely massive undertaking for them. That said, they've pulled off crazier shit before.

Not at all. Given that they're both dynamic programming languages with runtime dispatch, there's really little impedance mismatch between Ruby and Objective-C. Thus MacRuby, a Ruby implementation that encapsulates Objective-C objects and messages in Ruby objects and methods. Cocoa in Ruby without a bridge -- it's already there, it's a done deal.

Now as for whether they'd replace Objective-C with MacRuby, no, that wouldn't make sense. The two would live side by side. Apple can continue to implement Cocoa frameworks and core applications in Objective-C while also offering an excellent Ruby programming environment built on top of that.

It's sort of like C# vs. F# or IronPython in the .NET world -- Microsoft didn't have to replace the base .NET assembly implementation language (a.k.a. "assembly language for CLR") in order to provide more attractive dynamic or functional languages on top of the same infrastructure.

EDIT: In fact, the semantic mismatch between Objective-C and dynamic languages like Ruby is less than the mismatch between dynamic languages and the CLR, which mirrors the statically-typed semantics of C#. Is Apple's combination of the Objective-C type and dispatch systems and LLVM going to one-up .NET from a direction that we didn't see coming?

Re: Could Ruby be Apple's language and API future?

#35
post #28
post #12

Earlier quoted context omitted.

They could change 3.3.1, but they didn't have to blanket-ban Ruby to begin with — they made already have four languages they allow. The fact that Ruby was banned shows that they don't even place it on a level with C++, much less Objective-C. On top of that, MacRuby was just starting efforts to target the iPhone when Apple banned it, leading the developers to throw their hands in the air and say, "Oh well, didn't real…

Yes, they did have to blanket-ban it to begin with. If they're to make an exception for this, then in the interest of avoiding fragmentation they won't be making an exception for the Ruby language in the abstract; rather they'll be making the exception for the MacRuby implementation in particular. MacRuby is a unique implementation, and programming Cocoa through MacRuby is vastly different (and incompatible) experien…

I don't know about "not considered stable." The official MacRuby site claims the current version is "Stable for Cocoa Development." It's not on the iPhone, granted, but that's because it's banned, so nobody wants to waste time on it.

Re: Could Ruby be Apple's language and API future?

#36
MacRuby apparently performs quite well, at least in this stage of its development. What would be really interesting is if this translates into real-world Rails/Sinatra/whatever performance gains significant enough to create demand for OS X hosting...

Re: Could Ruby be Apple's language and API future?

#37
post #35
post #28

Earlier quoted context omitted.

Yes, they did have to blanket-ban it to begin with. If they're to make an exception for this, then in the interest of avoiding fragmentation they won't be making an exception for the Ruby language in the abstract; rather they'll be making the exception for the MacRuby implementation in particular. MacRuby is a unique implementation, and programming Cocoa through MacRuby is vastly different (and incompatible) experien…

I don't know about "not considered stable." The official MacRuby site claims the current version is "Stable for Cocoa Development." It's not on the iPhone, granted, but that's because it's banned, so nobody wants to waste time on it.

The MacRuby team reckons it's "stable", in the sense that the API shouldn't change too much in the future and it probably won't crash. But there are good reasons Steve might not yet consider it mature enough for the iPhone. For one thing, gems don't work yet.

Re: Could Ruby be Apple's language and API future?

#38
post #22
post #14

Earlier quoted context omitted.

Just remember that we're talking about a company that managed to migrate its entire product line to an entirely new processor with few people (inside and outside the company) really knowing until they unveiled the first demo machines. Compared to that, adding a new programming language (that doesn't even affect their existing 3rd party applications) to a platform they own completely is child's play.

I think we're talking past each other. All of your comments seem to be arguing that Apple could do this if it wanted to , while all of my posts are arguing that Apple hasn't shown any desire to do this .

AndrewO's comments seem to be arguing that Apple has made even more drastic changes in the past without publicly showing any desire to make the change until shortly before doing so.

Re: Could Ruby be Apple's language and API future?

#39
post #33
post #31

Earlier quoted context omitted.

You mean like MacRuby, say?

Did they already replace Matz MRI to LLVM-based one which can pass all ruby-spec? ^_^

The original interpreter is already replaced with YARV in 1.9. But yes, MacRuby replaces YARV with an LLVM-based virtual machine. (Only passes about 85% of RubySpec right now, though.)

Incidentally, Rubinius is also based on LLVM these days.

Post reply on HN