1) Objective C is a relatively high-level language. Its absolutely criminal to teach pointers, arrays, and casting at this stage of a tutorial on a high-level language. A string in Objective C is specified as such:
NSString* str = @”this is a string.”
Using C-style constructs for which there is an Obj C equivilent i terrible style.
2) With articles like this, it is no wonder that so few people understand numerics. The statement “an int is just a float with the decimal point pushed to the side” is *not* correct. Integers and floating point numbers are completely different. Integers are exact, floating-point numbers are inexact. If you can get away with an inexact number, you can use a float. However, sometimestimes you need an exact number with a decimal component. At that point, you shouldn’t use a float, but a specialized numeric library.
I mean who wants to learn cocoa ? who want to learn objective C ? What is it good for ? A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ? An API with a super steep learning curve that takes months to get acquiainted to ? For what ? Make apps on the mac ? Give me a break.
Objective C is sort of a poor man’s Smalltalk. Its dynamic nature makes it perfect for GUI programming. OpenStep (which is the predecessor to Cocoa) is widely considered one of the best GUI APIs ever made.
I mean who wants to learn cocoa ? who want to learn objective C ? What is it good for ? A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ? An API with a super steep learning curve that takes months to get acquiainted to ? For what ? Make apps on the mac ? Give me a break.
Oh, wise one, which are thou holiest of programming language, we beseech thee? Programming language are a means to an end. Powerful tools used to solve problems. Not religious and political orders.
A language doesn’t lose because of marketshare. Some languages are better in certain areas. If C++ was the be all and end all, Microsoft wouldn’t be developing C#.
Objective C is not only object oriented, but much more dynamic than C++, making it a good choice for a GUI. Objective C is fairly easy to learn.
Cocoa doesn’t have a super steep learning curve. One of it’s advantages is that it’s pretty easy to learn and work with. It is a large API though, so just like with anything, you would have to invest some time to learn it well.
I know I’m responding to an [ignorant|”clever”] troll, but anyway…
A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ?
“Losing” to C++ has nothing to do with the language design, but mostly with history of Objective-C: NeXT wasn’t overly interested in getting it popular outside NeXTSTEP, and the first GNU version of objc wasn’t released until 1992, by which C++ had already gained quite a momentum.
An API with a super steep learning curve that takes months to get acquiainted to ?
Either you have never even taken a look at NS/Cocoa API, or this is some new kind of humor still unknown to me… I’ve been getting into Cocoa programming for some time now (after *many* years of C and C++) and I can be nothing but amazed by the incredible elegance and simplicity of both NS API and Objective-C itself.
I’ve had a lot of “what the fuck was the language designer thinking about” moments with C++, but I never realized how bad of an OO language it was before getting into Objective-C.
For what ? Make apps on the mac ? Give me a break.
Well well… I still consider OS X the absolutely best current desktop OS, and developing apps for it doesn’t sound all that stupid of an idea. But outside OS X, NS API and Objective-C can be used for GNUstep (which is something I’ll take a better look at next time I get an x86 *nix box).
The articles are a Cocoa oriented C programming 101 and not about Cocoa, they are designed to get a reader up to speed with all the underlying C they need to start learning Cocoa/Objective C
Its pretty much a consensus among people teaching extended versions of C (C++, mainly) that it is far better to teach the high-level ObjC or C++ features first, rather than the low-level C subset. One of the worst problems with having a C subset to your language is that people try to write C code with it, and that just doesn’t work very well.
“I mean who wants to learn cocoa ? who want to learn objective C ? What is it good for ? A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ? An API with a super steep learning curve that takes months to get acquiainted to ? For what ? Make apps on the mac ? Give me a break.”
“Oh, wise one, which are thou holiest of programming language, we beseech thee? Programming language are a means to an end. Powerful tools used to solve problems. Not religious and political orders.”
Both statements have validity from realistic and idealistic standpoints. One also needs to consider some fundamental goals of developing open source or commercial software.
Commercial motives mean making software available on the most platforms for the fewest dollars to maximize profit.
Open source motives mean helping as many people as possible and watching your software flourish.
In both cases it’s beneficial to use an API that ports to more archictures than not. Unfortunately Cocoa is the least portable API right up there with the Win32 API.
In both cases it’s beneficial to use an API that ports to more archictures than not. Unfortunately Cocoa is the least portable API right up there with the Win32 API.
And <a href=”http://www.gnustep.org“>GNUstep, c’est du cochon ? It’s not Cocoa, but it’s an OpenStep implementation.
Plus, saying that the comment “An API with a super steep learning curve that takes months to get acquiainted to” is “realistic” is vastly untrue. OpenStep (on which Cocoa is based) is really the most clean and well-thought GUI API I have ever encountered. Qt is a nice one too (and it’s a bit inspired by OpenStep), but frankly, OpenStep is an incredible API.
Though you must admit that C code works far nicer with Objective-C than with C++, since the former is merely a syntax addition, rather than adding new syntax and redefining some of the old syntax in subtle ways, as in the latter.
I’m not sure but isn’t that just C programming 101 type stuff?
I must be missing something.
I’m not sure but isn’t that just C programming 101 type stuff?
Yes, it seems so to me.
This article is pretty bad.
1) Objective C is a relatively high-level language. Its absolutely criminal to teach pointers, arrays, and casting at this stage of a tutorial on a high-level language. A string in Objective C is specified as such:
NSString* str = @”this is a string.”
Using C-style constructs for which there is an Obj C equivilent i terrible style.
2) With articles like this, it is no wonder that so few people understand numerics. The statement “an int is just a float with the decimal point pushed to the side” is *not* correct. Integers and floating point numbers are completely different. Integers are exact, floating-point numbers are inexact. If you can get away with an inexact number, you can use a float. However, sometimestimes you need an exact number with a decimal component. At that point, you shouldn’t use a float, but a specialized numeric library.
The article really should NOT be called “Learning Cocoa”. It is a C tutorial.
I can’t believe that can slip pass O’Reily editors.
I mean who wants to learn cocoa ? who want to learn objective C ? What is it good for ? A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ? An API with a super steep learning curve that takes months to get acquiainted to ? For what ? Make apps on the mac ? Give me a break.
Objective C is sort of a poor man’s Smalltalk. Its dynamic nature makes it perfect for GUI programming. OpenStep (which is the predecessor to Cocoa) is widely considered one of the best GUI APIs ever made.
I mean who wants to learn cocoa ? who want to learn objective C ? What is it good for ? A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ? An API with a super steep learning curve that takes months to get acquiainted to ? For what ? Make apps on the mac ? Give me a break.
Oh, wise one, which are thou holiest of programming language, we beseech thee? Programming language are a means to an end. Powerful tools used to solve problems. Not religious and political orders.
A language doesn’t lose because of marketshare. Some languages are better in certain areas. If C++ was the be all and end all, Microsoft wouldn’t be developing C#.
Objective C is not only object oriented, but much more dynamic than C++, making it a good choice for a GUI. Objective C is fairly easy to learn.
Cocoa doesn’t have a super steep learning curve. One of it’s advantages is that it’s pretty easy to learn and work with. It is a large API though, so just like with anything, you would have to invest some time to learn it well.
Aside from that, you made some excellent points.
I know I’m responding to an [ignorant|”clever”] troll, but anyway…
A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ?
“Losing” to C++ has nothing to do with the language design, but mostly with history of Objective-C: NeXT wasn’t overly interested in getting it popular outside NeXTSTEP, and the first GNU version of objc wasn’t released until 1992, by which C++ had already gained quite a momentum.
An API with a super steep learning curve that takes months to get acquiainted to ?
Either you have never even taken a look at NS/Cocoa API, or this is some new kind of humor still unknown to me… I’ve been getting into Cocoa programming for some time now (after *many* years of C and C++) and I can be nothing but amazed by the incredible elegance and simplicity of both NS API and Objective-C itself.
I’ve had a lot of “what the fuck was the language designer thinking about” moments with C++, but I never realized how bad of an OO language it was before getting into Objective-C.
For what ? Make apps on the mac ? Give me a break.
Well well… I still consider OS X the absolutely best current desktop OS, and developing apps for it doesn’t sound all that stupid of an idea. But outside OS X, NS API and Objective-C can be used for GNUstep (which is something I’ll take a better look at next time I get an x86 *nix box).
The articles are a Cocoa oriented C programming 101 and not about Cocoa, they are designed to get a reader up to speed with all the underlying C they need to start learning Cocoa/Objective C
Its pretty much a consensus among people teaching extended versions of C (C++, mainly) that it is far better to teach the high-level ObjC or C++ features first, rather than the low-level C subset. One of the worst problems with having a C subset to your language is that people try to write C code with it, and that just doesn’t work very well.
“I mean who wants to learn cocoa ? who want to learn objective C ? What is it good for ? A loser of a language that is still in denial over the fact that it lost to C++ in the 80s ? An API with a super steep learning curve that takes months to get acquiainted to ? For what ? Make apps on the mac ? Give me a break.”
“Oh, wise one, which are thou holiest of programming language, we beseech thee? Programming language are a means to an end. Powerful tools used to solve problems. Not religious and political orders.”
Both statements have validity from realistic and idealistic standpoints. One also needs to consider some fundamental goals of developing open source or commercial software.
Commercial motives mean making software available on the most platforms for the fewest dollars to maximize profit.
Open source motives mean helping as many people as possible and watching your software flourish.
In both cases it’s beneficial to use an API that ports to more archictures than not. Unfortunately Cocoa is the least portable API right up there with the Win32 API.
In both cases it’s beneficial to use an API that ports to more archictures than not. Unfortunately Cocoa is the least portable API right up there with the Win32 API.
And <a href=”http://www.gnustep.org“>GNUstep, c’est du cochon ? It’s not Cocoa, but it’s an OpenStep implementation.
Plus, saying that the comment “An API with a super steep learning curve that takes months to get acquiainted to” is “realistic” is vastly untrue. OpenStep (on which Cocoa is based) is really the most clean and well-thought GUI API I have ever encountered. Qt is a nice one too (and it’s a bit inspired by OpenStep), but frankly, OpenStep is an incredible API.
Though you must admit that C code works far nicer with Objective-C than with C++, since the former is merely a syntax addition, rather than adding new syntax and redefining some of the old syntax in subtle ways, as in the latter.