Hacker News new | past | comments | ask | show | jobs | submit login

It hasn't been that hard for me to translate Objective-C code into Ruby. The hardest thing has been APIs that have varargs that end in nil for some reason.

Recently the RubyMotion team published this yardoc that translates all of the existing APIs for you into Ruby:

http://www.rubymotion.com/developer-center/api/index.html

But I didn't refer to that for the majority of the development since it wasn't around yet...I was knee-deep in the Apple docs for most of it.




I think that's an issue of moving from Objective-C (and pure C), to what is normally a dynamic language.

Using nil as a final argument (also called the 'sentinel') is fine for C to mark the end of a variable length array like it expects with 'strings' (so it doesn't stretch into the next unrelated block of memory), but you'd expect Ruby to handle that for you. Because in any other circumstance, it does.


Objective-C is dynamically typed.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: