Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving from C# on Windows to Objective-C on Mac

Tags:

c#

objective-c

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.)

like image 468
airplaneman19 Avatar asked Jul 03 '11 21:07

airplaneman19


People also ask

Is it easy to move from C to C++?

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.

Why do we go from C to 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.

Why is C becoming popular again?

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.

Is C still worth learning in 2022?

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.


1 Answers

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.

like image 96
0x90 Avatar answered Oct 20 '22 00:10

0x90