4 ms·
> absolutely. one can learn Objective-C in an afternoon if you know C ...See, that last part you toss off as if it's practically a given, but it's really not.
by danaris 3y ago
> absolutely. one can learn Objective-C in an afternoon if you know C
...See, that last part you toss off as if it's practically a given, but it's really not.
Sure, when I was (and probably you were) first going to CS classes, being taught C was pretty much the standard thing. But that's much less true now, from all I've seen.
And why not? 20 years ago, it was much, much more likely that if you were a programmer, you were going to be working with C code at some point. Nowadays, you can easily have full mastery in a dozen different languages, all of which are in widespread demand, and never touch C. (Or C++. Or C#. Or Objective-C.)
Personally, where I am at this point in my career? If I wanted to write a small utility program that runs natively on macOS, I'd pick Swift over C 10 times out of 10. I'm roughly equally familiar with both of them (which is "moderately"), and I know enough about the pitfalls of C to know that I don't want to deal with them, and Swift handles almost all of the frustration of memory management for me.
Plus, there's a single authoritative source for information about Swift for when I run into something I'm unfamiliar with, forgot, or got confused about. If I try the same in C there's literally thousands of different sources, of varying authority, across every major and minor platform that's ever existed, and every version of C. It's fantastic that there's all that information out there, don't get me wrong, but when I'm trying to write a small utility to solve a specific problem, every time I run into something that's talking about the wrong C version, or the wrong platform, or just plain has bad information, is going to add one more bit of frustration that's likely to make me quit trying.
Yes, Apple's documentation is imperfect—but I always know that it is there, acting as a single authority for the language.