Cocoa
Author |
Message |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Tue Oct 25, 2005 2:58 am Post subject: Cocoa |
|
|
...is designed around Objective-C? What? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
wtd
|
Posted: Tue Oct 25, 2005 3:03 am Post subject: (No subject) |
|
|
Yes.
Objective-C is a phenomenally simple OO extension to standard C. |
|
|
|
|
![](images/spacer.gif) |
rizzix
|
Posted: Tue Oct 25, 2005 11:22 am Post subject: (No subject) |
|
|
Yes, but hell a lot more flexible than Java or C++.. Very cool language... would have been ideal.. if it had a packaging/namespace feature. |
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Wed Oct 26, 2005 4:08 am Post subject: (No subject) |
|
|
Yea, I was wondering what the differences between C++ and Obj-C.
Flexibility? Simplicity? |
|
|
|
|
![](images/spacer.gif) |
rizzix
|
Posted: Wed Oct 26, 2005 9:14 am Post subject: (No subject) |
|
|
practicality (there's no point in programming in a language that has far too many things to worry about)
athough, there are some good things about C++.. such as generic programming (although obj-c's "id" kindof makes is quite redundant).. but in the same way how C programmers sometimes use C++ as a better C... you can use combination of Objective-C and C++.. it's called Objective-C++.. It's not a new language, just a means of combining two different languages. |
|
|
|
|
![](images/spacer.gif) |
wtd
|
Posted: Wed Oct 26, 2005 11:32 am Post subject: (No subject) |
|
|
[Gandalf] wrote: Yea, I was wondering what the differences between C++ and Obj-C.
Flexibility? Simplicity?
C++ is an entirely new language that mostly maintains compatability with C, but cannot entirely since it adds so much new functionality.
Objective-C is a perfect superset of standard C. It adds object-oriented programming via a very small addition to C which does not conflit with C's syntax or semantics.
Objective-C is by far the easier of the two languages to learn. However, the value of Objective-C lies not so much in the language, but in the Cocoa API(s), which are vast and take a great deal of time to master. |
|
|
|
|
![](images/spacer.gif) |
goomba
|
Posted: Wed Oct 26, 2005 5:29 pm Post subject: (No subject) |
|
|
[rizzix] wrote: Yes, but hell a lot more flexible than Java or C++.. Very cool language... would have been ideal.. if it had a packaging/namespace feature.
Objective-C mostly solves this issue by encouraging proper prefixing techniques. Since there's no namespace support, most ObjC coders end up being very good at following naming conventions since they can't be lazy about it.
[Gandalf] wrote: Yea, I was wondering what the differences between C++ and Obj-C.
Flexibility? Simplicity?
As wtd said, Objective-C is a superset which means that an Objective-C compiler can handle ANY C code without making modifications. C++ greatly resembles C but you will almost always need to modify C code to compile it as a C++ program.
The real point of learning Objective-C is because it is the preferred language for Mac OS X development using Apple's XCode and Cocoa. It is possible to make great OS X programs with very little code thanks to Interface Builder, which, unlike most GUI builders, does not generate code itself, but instead provides outlets between the Objective-C source files and the onscreen widgets in proper Model-View Controller style. The actual GUI is serialized in separate "nib" files which you include in your app bundles. http://developer.apple.com/Cocoa is a great resource for learning more about Cocoa and XCode.
Objective C programming is also feasible in Linux and Windows using GNUStep, but its implementation of the NEXT libraries is not nearly as complete as that of Apple. So unless you are planning on building programs for Mac users, you should learn C++ (or even better, C# or Java.) |
|
|
|
|
![](images/spacer.gif) |
rizzix
|
Posted: Thu Oct 27, 2005 1:20 pm Post subject: (No subject) |
|
|
yay another mac dude~!!! ( i think )
btw: yes i'm aware they need to name the classes in a perticular way.. but let's take this example: Netscape and NeXtStep.. Both think NS is a good prefix as a naming convention... problem now isin't it.. specially if both companies were at opposite ends of the world and knew nothing about each other.. and one fine day they happen to meet and decide to collaborate and use each other's technologies.. or a 3rd party tries to do that.. same effect.. it's "chaos" |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
goomba
|
Posted: Thu Oct 27, 2005 7:05 pm Post subject: (No subject) |
|
|
Yep, I'm a mac (and linux!) guy but still very much a newbie to ObjC/Cocoa. Coming from Java, ObjC syntax rules and Cocoa is incredible, so maybe I'm just excited enough about it to overlook namespacing as a big issue. (Actually, I mostly miss the convenience of a garbage collector, but I hear Apple is working on one.) |
|
|
|
|
![](images/spacer.gif) |
|
|