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

I'm sure the runtime is great, unfortunately the syntax sucks, there is no GC (on iOS) and it can't curry functions, and you can't put an NSInteger into an NSDictionary with out line noise that would do java proud, it doesn't support passing or currying functions.

Sorry, but passing a selector and an object is atrocious, even MS can figure out how to pass a delegate that can figure out whether it needs to pass a this pointer before passing the rest of the arguments.

It's lambda syntax is also attrocious [[ ^ (int x, int x) { return x+y; } copy] autorelease] , wtf is that garbage?

In ruby I don't need to touch 2 different files and put code in 3 places just to define a property, nor do I have to do this in C# or F#.

I doubt it's much faster than C# or F#, especially if it ever involves something simple like putting an integer in a hashtable.

I'd hardly call a language dynamically typed when it will fuck up adding a long and an int. Seriously, define a type that takes an int, pass it a long and see what happens. This is exactly what I mean by the flexibility of C (attrocious type system) and the speed of small talk (incurring a call to objc_msg_send anytime you do anything)




* Syntax sucks: I think Objective-C is actually pretty beautiful. Maybe I'm crazy.

* NSInvocation should serve the same purpose in most cases.

* I find the block syntax atrocious if compared to Lisp lambdas. It's not that bad. Blocks are objects, so you're creating an object, with all the same predictable retain/release semantics. Maybe a few gotchas if you're not reading the documentation and realize you should avoid retain loops. Hardly different from Java, only it's easier to miss it in Java, because you never release, anywhere.


The lack of namespaces seems silly to me: NSThis, NSThat.

It isn't that Obj. C is a bad language, it's just it doesn't feel like a more modern language, and yet it gets used because of the possibility of $$$. I do understand that you can come to love a language after a period of using (and understanding) it. And I do think a systems-level language should be used for apps on mobile devices, but we don't have to continue to be mired in implementation details that were an artifact of a language from the seventies.

I need to play with it more to get a better feel for it.


> Seriously, define a type that takes an int, pass it a long and see what happens.

I don't understand your problem. Are you calling a C function without prototyping it, or sending a message without prototyping the selector? There are warnings for both of these, and an option to make at least the first an explicit error.

> In ruby I don't need to touch 2 different files and put code in 3 places just to define a property, nor do I have to do this in C# or F#.

I believe @synthesize improves this.


I absolutely agree but just responding to one point - i've played with Lua Wax and the lack of debugging and the fact that any Lua script error causes a segfault makes coding with Lua not worth the pain of losing the XCode editor and debugger and statement completion, etc.

If you're putting in a scripting engine for a game that's one thing. If you want an easier way to write cellForRowAtIndexPath, I don't recommend it...


I spend my days writing an iOS front end and its Ruby backend, and could not agree with you more.


The language is not the runtime. Witness MacRuby. http://www.macruby.org/

"MacRuby is an implementation of Ruby 1.9 directly on top of Mac OS X core technologies such as the Objective-C runtime and garbage collector, the LLVM compiler infrastructure and the Foundation and ICU frameworks. It is the goal of MacRuby to enable the creation of full-fledged Mac OS X applications which do not sacrifice performance in order to enjoy the benefits of using Ruby."


It's a minor issue, but if you frequently add integers to dictionaries you can easily add a category on NSDictionary with your new method. That's a feature I miss in C++.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: