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

When I think about it, it astonishes me that there are people in the world who take Apple's developer tools, and make some really beautiful and useful iOS apps. I've tried on and off since high school and have never been able to do it. I started in high school with Xcode and Objective-C, which is a very difficult language to work with (being not that far removed from C/C++). When they moved to Swift I thought "okay finally, now I can make some iOS apps!", but Swift also proved to be a bit of a strange language, it's like the pendulum swung in the opposite direction- Apple was trying to cater to non-devs with it. So we ended up with something that was sort of like Python but still retained some elements from Objective-C.

Of course during this entire time span, Xcode remained a garbage IDE. That's probably the main hindrance for devs and would-be devs. Swift can be navigated, Xcode is a black hole of doom.




I’ve been quite happy with Objective-C and Swift from mostly hobbyist experience, but Xcode truly is baffling.

Any time I’ve ever had to do anything with build configs or something relating to project metadata rather than just writing code, I’ve just been winging it based on some average of StackOverflow advice, weighted towards recency cause it all seems to change every few years.

I have no idea if this stuff is all documented anywhere; if it is I haven’t been able to find it.


ObjC is not “a very difficult language to work with” by any means, and Xcode is fine - it’s not the absolute best IDE out there, but having tried several, it’s ok.

Honestly, having “enjoyed” decades of different systems, from the days of 8” floppies onwards, developers today are spoilt rotten, and still find things to complain about. Grumble, mumble, kids today, get off my lawn etc etc


Objective-C is the only programming language that was genuinely unreadable on first glance to me so I would definitely agree that it's difficult to work with.


Personally i don’t see much difference between

class obj = new class()

and

class obj = [class new]

And i think the named parameters are easier to read

And ARC gives you pretty easy memory management - basically “don’t even have to think about it” except for more-obscure cases, even then weak properties can help out.

ObjC is really only a little more complex than C, but gives you so much more for that little increase. It’s orders of magnitude less complicated than c++, but is capable of handling enormous codebases just like C++

It is under-appreciated IMHO.


Your example isn't representative of an entire language, though. It's convenient to your case to use class instantiation, one of the easiest things to do in any language.


Well, yes, I didn't put everything in the language into a post. You got me there.

How about generic containers that can store any object ? Even using the old syntax, it's pretty clear what's going on

NSMutableDictionary *container = [NSMutableDictionary new];

NSString * item = [NSString stringWithUTF8String:"hi there"];

[container setObject:item forKey:@"greeting"];

Where @"..." is a shorthand for a constant NSString

And then the next thing to add could be a number...

NSNumber * age = [NSNumber numberWithInt:18];

[container setObject:age forKey:@"age"];

Then add in an NSDate, or another NSDictionary, or NSArray type....

The standard library that comes with ObjC is really powerful, and since it's ubiquitous, it works really well across a range of apps.

And then there are some really nice design patterns. Create an NSNotificationCenter and enjoy the Observer pattern, tightly integrated into the event loop. Any object can notify any other simply by posting a notification, and any object can listen for them by registering interest. And since collections can store anything, it's easy to pass state around and make large applications work well without interdependency hell. Just one of the built-in nice things... And all without caring about memory management.


I think you’re making my case for me. All of that seems easy and straightforward to you, but not to me. It’s worth noting that I struggle similarly with C++ and Rust. I just think the syntax is harder to read than a Java or a C# or a Python.


Jeez, Java is a nightmare! And I’m not a fan of Python either. I think we’ll just have to agree to differ…


I agree that Java isn’t pleasant to work in- but not because of the syntax. It’s everything else, like the JVM, Oracle’s shenanigans with licensing, etc.


can attest; I bounced off Xcode several times when trying to bootstrap my way into a dev career in 2010 or so, despite being a lifelong Mac user.




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

Search: