I'm going to be getting my first Mac computer soon, and I want to learn Objective-C. I already have experience in C#, and I've already started learning C++, but absolutely everything in Objective-C confuses me, including memory management. Do you have any tips on moving from C# to Objective-C? I've read that I should learn C++ before learning Objective-C, but so far C++ looks a lot like C# which looks very different from Objective-C.
Edit: For the people trying to learn from this question, I HIGHLY recommend buying the "Learn Objective-C on the Mac" book by Apress. It's very well written if you're coming from a C-like language (like C, C++, C#, Java, PHP, etc.)
Switching from C to C++ can be both easy, as there are many similarities between the two languages, and hard, as there are many differences that require forgetting what you know and habits that you may have developed from programming in C.
C++ language is a subset of the C language. C++ was first designed as an extension of C language. Thus in addition to the procedural language features derived from C, C++ also supports object-oriented programming features like inheritance, polymorphism, abstraction, encapsulation, etc.
Another reason for C's popularity might be because of the language's use in embedded devices and its cross-platform programming. As the Internet of Things continues to gain prominence, C will also likely grow along with it, as well as continue its use as a general-purpose programming language.
C is worth learning in 2022 because it is easy to grasp. It gives you basic knowledge about the inner workings of computer systems and the core concepts that drive programming.
Learn Objective-C directly. No need to learn C++ first. The two are completely different in all aspects that seem to confuse you.
Also understand that for writing functional applications on the Mac, your focus will be more on learning and understanding the Cocoa API than Objective-C itself. Objective-C can be picked up in an afternoon by an experienced programmer. Cocoa takes more time.
For the purpose of learning Cocoa (and Objective-C at the same time), I recommend "Learn Cocoa on the Mac". It's the book most developers on our team used to get started.
If your focus is on iOS development instead, you'll need to learn Cocoa-Touch. I learned it using Beginning iPhone 4 Development, which I can recommend.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With