I'm a Rubyist, it's my primary language and I'd love to use it over Objective-c. But I'm also starting really like Obj-c, and right now it's the best thing out there for iOS because of XCode.
If you want to learn how to make iOS apps, learn Objective-c. Or at the very least learn it first. Trust me, you'll be glad you did.
It's only a matter of time before someone creates a DSL that looks something like:
window = screen.main.new_window(
frame: true,
key: true,
visible: true
)
Or something like that. I'm not an iOS developer, so I'm not really sure what parts of the insanely-verbose method calls are actually necessary.(As an aside, I have Vim rigged up to do autocompletion with Ruby. I'm sure it would work with these Cocoa libraries as well)
It's called "Intention Revealing Names." Names are long to provide the programmer information, so shortening them would have a negative impact.
As an aside, I have Vim rigged up to do autocompletion with Ruby. I'm sure it would work with these Cocoa libraries as well
If someone writes the necessary plumbing.
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
Was about 45 key presses in Xcode. And this is a fairly short method, take something like animating a view with a block and you're looking at way more typing to do it in Ruby Motion.
The example author made here feels like I will end up typing about twice as much with RubyMotion than objective C.
Ruby: @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @window.makeKeyAndVisible
Objective C: self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible];