Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know you aren't comparing the time it takes to learn Cocoa vs. Objective-C. My point is that if you did make the comparison, you'd realize that if you have the time to learn Cocoa, you have the time to learn Objective-C, because the latter takes basically no time compared to the former. You get a time savings of like 0.05% by learning MacRuby instead of Objective-C.


No hostility :)

You're just on the defensive, so it feels like hostility. It's understandable...

> My point is that if you did make the comparison...

But I didn't.

I never compared the two.

My statement was one of a speed gain by simply using the languages/tools you're most familiar with, instead of learning new languages/tools.

It cuts out a lot of time, it's not a hard concept to understand ;)


> No hostility :)

> You're just on the defensive, so it feels like hostility. It's understandable...

Really, no. I don't know if it's intentional or not, but you come across as very passive-aggressive and condescending. I don't even know what it is I'm supposed to be "on the defensive" about — the fact that learning Objective-C takes much less time than learning Cocoa? I feel pretty secure in that knowledge.

> But I didn't.

> I never compared the two.

Yes, that is my point — your opinion has no sense of scale, because you haven't compared the two. You're talking about saving pennies on the price of a sports car. I just don't think it's a particularly pressing concern. If you're that worried about pennies, you're probably not in a position to buy that car.

But, you know, whatever works for you.


Apparently the disconnect here comes because you think of a language as trivial (as compared to an API), however it's often hard to separate the language (syntax, and its built in methods), and the libraries which make up an API/standard library. In addition to the cost of learning a library/language, there is also a day to day cost in using it - a certain friction which encourages you to take some paths and not others. A language and the available tools constrains the way you think about problems you are solving, and in some cases might dictate the sort of solutions you come up with.

For example, consider using regular expressions in Ruby to check a string -

  puts "The limits of my language define the limits of my world" if string =~ /foobar(\d*\w)/
or in Objective C:

  NSError *error = NULL;
  NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"foobar(\\d*\\w)"
  options:NSRegularExpressionCaseInsensitive error:&error];
  NSTextCheckingResult *match = [regex firstMatchInString:string
                                                options:0
                                                  range:NSMakeRange(0, [string length])];
  if (match) {
    NSLog(@"The limits of my language define the limits of my world - Wittgenstein")
  }
Until quite recently it wasn't even possible to do this in ObjC without an external library.


I don't understand how this relates to anything I've said. How is this meant to show that the time it would take to learn Objective-C while you're learning Cocoa is prohibitive?

Actually, I think your code examples support my point. You're not contrasting Ruby and Objective-C, you're contrasting Ruby's standard library with the Objective-C library Foundation, which is what you need to learn to get any real use out of MacRuby/RubyMotion. Here's the MacRuby/Cocoa version of that code:

  error = Pointer.new_with_type '@'
  regex = NSRegularExpression.regularExpressionWithPattern("foobar(\\d*\\w)", options: NSRegularExpressionCaseInsensitive error: error)
  match = regex.firstMatchInString(string, options: 0, range: NSMakeRange(0, string.length))
  NSLog "The limits of my language define the limits of my world - Wittgenstein" if match
Do you really feel that Objective-C is the biggest difference between the three examples?

BTW, if it sounds like I'm trying to say RubyMotion is pointless, I'm not. I'm just saying that "I don't want to go to the trouble of learning Objective-C" is a weak reason to use RubyMotion, because you'll have to do 99.95% of the same work anyway.


Are normal ruby regex expressions not available in macruby/Rubymotion? If so, why would you bother to use the above code using cocoa regex when the idiomatic ruby version is so much shorter and simpler?

The example was supposed to illustrate that some things are easier and more concise in ruby, and thus also presumably in something like Rubymotion. The relevance to your posts is that you are ignoring some very good reasons to use ruby in your focus on the cocoa api - not all programming in ios consists of calls to the api so learning it is not the only thing required to make an iPhone app. In some apps api calls might make up half of the code, with the rest being back-end stuff. Evidently Rubymotion does not mean you can avoid learning the api, it just helps you write the rest of your code in a preferred language while painlessly calling the apis to show stuff on the screen. Not having to deal with Xcode would be a bonus too.


I really feel like you believe I'm arguing that you shouldn't use Ruby or RubyMotion. I'm not! Ruby has been my go-to language for half a decade now. Heck, I even follow both the MacRuby mailing list and Twitter list. To reiterate, this is the entirety of my argument:

> "I don't want to go to the trouble of learning Objective-C" is a weak reason to use RubyMotion, because you'll have to do 99.95% of the same work anyway.

The fact that Ruby can express things very concisely has nothing to do with whether or not learning Objective-C adds an appreciable amount to time to the process of learning Cocoa. That's why I was ignoring it. If you simply like Ruby on its own merits, that's a good reason to use it.


> The fact that Ruby can express things very concisely has nothing to do with whether or not learning Objective-C adds an appreciable amount to time to the process of learning Cocoa.

Here's the disconnect. That was never my point.

Please re-read my initial comment. You responded to that comment, hence you're responding to my initial point, which has nothing to do with your argument.

Do you get it?

The problem is your just not able to express your point, clearly, in relation to the context of this topic. Maybe face-to-face, verbally, you'd do a brilliant job of it. But in the written form, well... Not so good.

A little humility on your part would go a long way. Just saying ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: