For me, I prefer working in Ruby. Some people don't. But I think this will probably spurn me to get more serious about writing more iPhone apps, and it should open the door for a few more people who work on Ruby-based apps to write their own simple iPhone apps rather than paying a consultant to do it for them.
I can use Ruby's nice facilities for external processes (e.g., "x = `ls`" to get a directory listing or "system('do_something')") or simple regular expressions (i.e., "'string' =~ /my_regex/" and friends vs. NSRegularExpression's verbose syntax). I'm not forced to use Cocoa's verbose API if it has a nice Ruby wrapper (and if it doesn't have one, I can make one).
https://github.com/HipByte/RubyMotionSamples/blob/master/Ges...
Is what 95% of the code in your app is going to look like and I don't really see what it's buying you. You're also throwing away all the type checking you'd get on essentially the same code in Obj-C.
I really like Ruby but I don't intend to use it for iOS apps.
I can't express properly how awesome it is, really.
i.e. [obj method: param second: param2]; vs obj.method(param, second: param2) which is exactly two characters shorter in ruby.
And what would be the point of having something that looks like Objective-C?
UIColor.colorWithRed(red/100.0, green:green/100.0, blue:blue/100.0, alpha:1.0)
vs [UIColor colorWithRed:red/100.0 green:green/100.0 blue:blue/100.0 alpha:1.0];
>And what would be the point of having something that looks like Objective-C?Because the name of the function is not colorWithRed(), it is colorWithRed:blue:green:alpha:.
In the Ruby version I wouldn't use that selector with any parens. The resulting line would be one character longer than the ObjC version but use the Shift key one less time and would avoid two pinky trips out to the square brackets. (unless I am miscounting)
All other things being equal between the two options, and of course they aren't but let's just keep splitting hairs for a moment, it sounds like a typing win for the Ruby option. Readability is of course in the eye of the beholder.
In practice, how big a problem is that?
That may have changed tough because I dropped the xib as I didn't really needed it.
I would liken it to not using HTML when you're making a web app and you can only use javascript to generate (by hand) all of the UI.
In both cases, there are border cases that need to be handled in code (or markup).
I bet they are working on it, though...
I hope for the day when we have better and more type safe languages for system programming.
Most attempts so far, Modula-* family, Ada, Oberon and so on, failed to catch on, to my dismay.
Still it does not hurt to know some C.
I did some looking, and I found a few[1] examples[2] of coroutines in Objective-C, though none of them seemed fully fleshed-out. Even if they were, none were, as you say, nearly as nice as "yield".
Header files are so 70's.
If you have a good background in C than yes, using Objective-C is not so difficult.
This is a very exciting (and very positive) development, but at this moment in time I would still bite the bullet with Objective-C. I came to it with a background in PHP of all things and didn't struggle with picking it up in a few weeks.
I can't wait to see the things people do with it and with Ruby's metaprogramming.