Is C# the same as Objective-C?
Simple question, I'm 开发者_如何学Gojust looking for a yes or no clarification. A citation would be appreciated but not necessary.
Bonus Question - Can Objective-C be used on Windows, or only on Mac OS?
No.
http://en.wikipedia.org/wiki/C_Sharp_%28programming_language%29
http://en.wikipedia.org/wiki/Objective-C
Bonus: Objective-C can be compiled by GCC, which can run on Windows.
No. Essentially: Objective C is from Apple and C# is from Microsoft. That's a gross oversimplification, but it's close enough.
No. Objective-C was developed around the same time as C++ (late 1980s), and C# was developed much more recently (early 2000s).
Objective C can be thought of as a thin layer on top of 'C'. It was designed in the early '80s and Steve Jobs used it for the NeXT development. Since OSX is built upon that foundation, Mac / iPhone development use Objective C
Essentially:
Objective-C is an object-oriented layer on top of C. It's a combination of C and Smalltalk.
C# is a reworking of Java, which is a simplification of C++, which is a different object-oriented layer on top of C.
They're cousins -- both come from C originally -- but they went down different paths.
So, the difference between the two is clear.
Can you use Objective C on platform X? Of course, it's in gcc, but the only current platform that has really good Objective C libraries is OS X, although there is GnuSTEP (which is not really mature). So, it really depends on what you want to do with the language.
The answer is no. The two languages aren't the same. One very important difference to note is that Objective C uses a very thin run-time system to run iOS applications while C# targets Common Language Runtime (CLR) which is a full blown virtual execution system (VES).
Objective C likely to get overshadowed by swift language which is a new offering from Apple targeting iOS platform.
精彩评论