• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: New Cocoa Programmer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Cocoa Programmer


  • Subject: Re: New Cocoa Programmer
  • From: Bill Cheeseman <email@hidden>
  • Date: Sat, 10 Nov 2001 16:38:54 -0500

on 11/10/01 12:11 PM, Marcel Weiher at email@hidden wrote:

>> But, if the goal also includes getting folks with less experience
>> excited and proficient in Cocoa/Objective-C, then you are wrong, wrong,
>> wrong! What is the point of starting with C when at least a third of
>> it will never be used at all, and another third will have to be
>> unlearned?
>
> There is no C you have to unlearn, though it might atrophy a little.

I guess I'm coming in on the tail end of a tired thread, here, but what the
hey.

My experience has been that your C knowledge won't even atrophy -- you will
need all of it at one time or another to use Cocoa to its fullest. I meant
to start compiling a list of examples of the more obscure C-isms that
actually are needed in Cocoa/Objective-C programming, but I never got around
to it and now I've forgotten the examples.

Most of the examples had to do with the fact that there are a lot of
functions in Cocoa, and some of them require use of the more obscure C-isms.
When you're just getting started with Cocoa, it's easy to overlook the fact
that all those functions are available, because they're documented in a
separate location, not in the class reference document for the class in
which they are declared.

One example that I do recall is that there are a number of functions and, I
think, instance methods, that require an understanding of C's syntax for
dereferencing pointers (when to use '&', and so on). Also, I frequently find
it very convenient to use the C terniary operator '?', which, when I was
first learning C, I thought was very obscure.

I'll make a point of compiling my list of examples for the next edition of
Vermont Recipes, because this is a question that often comes up with
newcomers.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont


References: 
 >Re: New Cocoa Programmer (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Re: Threading, save panels, and segfaults
  • Next by Date: Controlling selection in NSTextFields
  • Previous by thread: Re: New Cocoa Programmer
  • Next by thread: Re: New Cocoa Programmer
  • Index(es):
    • Date
    • Thread