News for hackers. Stuff that matters.
Re:Why RubyMotion Is Better Than Objective-C by poutine on Friday May 04, 2012 @12:04PM (#3928993)
- Objective-C is Hard to Use

It has a much steeper learning curve than Ruby for sure, but once you're proficient it's no harder to use. Indeed there's benefits to both languages.

- Xcode is Unstable

It's gone through periods of instability. But in the current version you may encounter the odd crash (perhaps once a week in full time use for me). Really not an issue given it's a cutting edge tool that's rapidly evolving.

- Xcode Hides Important Information

It has a learning curve. Some things take time to learn but once you do you're more productive.

- Objective-C Is Tedious

Matter of opinion. One person's tedium is another being explicit and reaping the benefits during refactoring, code completion and compilation speed.

- RubyMotion is Easy to Use

For sure easier than Objective-C. But so what? Can it build complex apps more quickly than Objective-C when someone becomes proficient? Probably not.

- RubyMotion is Ruby

That's great. Ruby is a great, easy to use and powerful language. I love Ruby. However given all the other things you sacrifice to get Ruby it's really not worth it.

- RubyMotion Makes Debugging Easy

Really? It sure doesn't look like it does. Xcode and LLVM save me a hell of a lot of time writing my apps because I don't need to actually run them and see the exceptions. And what about the static analyzer?

- RubyMotion Isn’t Perfect

Indeed.

- Better Than Objective-C

For trivial apps yes. For apps you'll be paid to write, in my opinion probably not.

Re:Why RubyMotion Is Better Than Objective-C by jad on Friday May 04, 2012 @01:39PM (#3929459)

  >> - Objective-C Is Tedious
  >
  > Matter of opinion. One person's tedium is another being explicit and reaping the
  > benefits during refactoring, code completion and compilation speed.
This is not a matter of opinion.

Objective-C:

NSDictionary *d = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInteger:1], @"foo", [NSNumber numberWithBool:YES], @"bar", nil];

Ruby:

d = {foo: 1, bar: true}

Objective-C's "explicitness" provides no advantage to the programmer here whatsoever.

I write code all day every day in Objective-C. It is an extremely tedious language that requires large amounts of boilerplate to perform even simple tasks. (Yes, I know about the new literal syntax available in Mountain Lion, but that doesn't change the broader point.)

Your programming language is the most powerful tool in your toolbox. Ruby is clearly more powerful than Objective-C in terms of how much code one has to write to accomplish a given task.

Re:Why RubyMotion Is Better Than Objective-C by cageface on Friday May 04, 2012 @12:14PM (#3929053)
I have yet to write an iOS app where I didn't at least once dip down into raw C for speed and/or control. On resource constrained platforms Obj-C's ability to go from high to low in a line of code is a big competitive advantage. I don't give that up lightly.

If RubyMotion offered a truly higher level abstraction over Cocoa Touch or offered cross-platform portability I might be interested but an arguably better syntax over the same API just isn't enough of a win.

Re:Why RubyMotion Is Better Than Objective-C by bunderbunder on Friday May 04, 2012 @12:39PM (#3929199)
Score one for ObjC's use of reference counting instead of a garbage collector on iOS, too.

Now don't get me wrong, I'm normally of the opinion that anything that whiffs of manual memory management is for chumps. But by day I write apps that target workstations that have enough RAM that I can get away with pretending that memory is an unlimited resource.

On a memory-constrained platform like iOS, though, being able to tightly control how much memory you're using becomes much more valuable. If not critical. And the one place where garbage collection simply can't beat manual memory management is total memory consumed. All those dead objects that are waiting around to be scooped up by the collector do take up space. Sometimes a whole lot of it.

Re:Why RubyMotion Is Better Than Objective-C by ryanpetrich on Friday May 04, 2012 @01:36PM (#3929443)
It's not all rainbows and butterflies. From the RubyMotion documentation: "Object cycles, when two or more objects refer to each other, are currently not handled by the runtime, but will be in future releases."
Re:Why RubyMotion Is Better Than Objective-C by chc on Friday May 04, 2012 @01:09PM (#3929340)
MacRuby/RubyMotion uses the same reference-counting mechanism as Objective-C, so I'm not sure how that relates.
Re:Why RubyMotion Is Better Than Objective-C by trebor on Friday May 04, 2012 @12:43PM (#3929217)
Could you explain:

    - RubyMotion is Ruby
    That's great. Ruby is a great, easy to use and powerful language. I love Ruby. However given all the other things you sacrifice to get Ruby it's really not worth it.
What do you sacrifice to get to use Ruby? I've avoided learning to program iOS because I really dislike Obj-C. If Ruby were good enough for 60% of the apps on the App Store I'd join in a heartbeat.
Re:Why RubyMotion Is Better Than Objective-C by poutine on Friday May 04, 2012 @12:57PM (#3929289)
- No Interface builder. Really a big loss given the power of Storyboards/segues, layout of objects, complex flows.

- No syntax/error checking as you type

- No static analyzer

- No code completion (perhaps you could find a 3rd party module to do this eventually)

- No refactoring support (very important in larger projects)

- Probably longer compilations (in Xcode/ObjC the compiler will know which files are modified by looking at the included headers and only recompile what is needed, in Ruby I would expect it's gotta do them all but could be wrong).

Re:Why RubyMotion Is Better Than Objective-C by cmelbye on Friday May 04, 2012 @12:09PM (#3929030)
All of these points are subjective, why are you trying to argue against them?..
Re:Why RubyMotion Is Better Than Objective-C by poutine on Friday May 04, 2012 @12:20PM (#3929080)
Because I wanted to? It's the Internet.