1

I'm a python programmer, and today I start my journey of C.
Now I'm using OSX, with Ubuntu in my Virtual machine, meanwhile our production servers are using CentOS.

I suppose these three systems have differences on their C libraries.
So should I pick one carefully as the learning environment according to my purpose.
Or this choice between learning environment isn't substantial, that any of these three has not that much differences and I can pick randomly?

Zen
  • 7,537
  • What is your purpose? – joeytwiddle Jun 05 '15 at 12:00
  • Eclipse, Netbeans and Qt provide cross platform Integrated Development Environments which all work with generic ANSI C/C++ development. Eclipse & Netbeans are Java based. Qt is written in C/C++. Qt also provides a C/C++ application framework which can target OS X, Linux, Android, etc. You may find that the development environment choice to has more differences that matter to you than the OS choice. – marc-medley Dec 16 '15 at 18:59

3 Answers3

3

You can write software using the GNU C Compiler (gcc) on all three of those environments, without any substantial difference.

(You might like to look at the source code of some existing cross-platform packages offered by Homebrew. You can grab the source code of any package using brew fetch ....)

However, apps written specifically for Mac OS X (or for iOS platforms), tend to be written in Objective C. This provides additional syntax unavailable in plan C or C++. And the libraries used to create Mac OS X / iOS apps will not be available in other environments.

Whilst Objective C can be used on other platforms, learning the Apple libraries is not really a skill that you can transfer to non-Apple environments.

(And additionally, Apple are now moving from Objective C to the Swift language.)

joeytwiddle
  • 1,018
  • 9
  • 15
  • 2
    It should be noted that Objective-C is not what anyone would call "C". Yes, you can write a lot, if not most, of standard C using it but to call it the same thing would be wrong. – Rob Jun 05 '15 at 12:31
1

C is a standard not based on which operating system you use. OSX is certified Unix while Linux is only Unix-like (and getting less so) but C on Windows should be based on the same standard. So there are differences based on which standard C you are using and not which operating system.

You might get more informed answers on the Programming Stackexchange.

Rob
  • 1,780
1

Today, few programs are written in C. This is mostly low-level things like Linux kernel or glibc. However, C is subset of C++, objective C, C# and Java is very close by syntax. So it worth learning C.

There is significant difference between usage of C on Windows and Linux, but as both MacOS and Linux are UNIX-like systems so it doesn't matter would you learn it on MacOS or Linux. For C learning purposes, this systems are equal.

gena2x
  • 2,397
  • 1
    With concessions for the precise meaning of "popularity" versus "few programs written", if one goes to any of the programming language statistics sites, e.g. http://langpop.com/ one can clearly see that C is currently far from "few programs" written in it. It appears as a par or slightly in advance of C++ – Theophrastus Jun 05 '15 at 14:47