The Double Life of Variables
Subject:   Could you some rules of thumb
Date:   2003-10-09 09:24:08
From:   anonymous2
First I think the interest in the level of programming instruction should point O'Reilly towards some new unmet market segments.

Now the question: Are there rules of thumb to choosing a variable versus a pointer from a programming design perspective?

I have been working through the book "Building Cocoa Applications" and in one part the author uses a variable in an area where perviously he had only used pointers. The choice probably makes clear sense, but since that part of the code was not the major thrust, he did not comment on why pointer was not used. So I was left scrtaching my head?

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Could you some rules of thumb
    2003-10-09 10:11:08  tallama [View]

    There are many rules of thumb, but probably the most important one for Cocoa development is that Objects are always used with pointers, because objects have to live in the heap. There are a number of other uses for pointers, some of which are good and some of which aren't. We'll explore some more in coming lessons; a comment isn't big enough to cover them!

    - Seth A. Roby