• 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: static typing (Learning Cocoa Chapter 13)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static typing (Learning Cocoa Chapter 13)


  • Subject: Re: static typing (Learning Cocoa Chapter 13)
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 23 Sep 2001 12:51:40 +0200

Jeff,

>>>>>> Jeff Binder (JB) wrote at Sat, 22 Sep 2001 17:48:28 -0400:
JB> Actually, I use handles in my Cocoa program as a resizable,
JB> multidimentional array for storing vertices. It's more convenient than
JB> using pointer arithmetic. And don't tell me to use NSArrays, it would be
JB> far too slow (I'm storing vertices and normals to send to OpenGL).
...
>>>>>> Brendan Younger (BY) wrote at Sat, 22 Sep 2001 18:19:50 -0400:
BY> Not quite, Ondra. Check out NSFormatter
BY> -getObjectValue:forString:errorDescription:. There are others too, I
BY> just haven't bothered to find them.

I would beg to differ in opinion of calling those things "handles". So far
as I remember the Mac OS API I've used till I went NeXTStep, "handle" was not
a generic synonyme for any pointer to a pointer, but a very special name of
a very special OS-controlled pointer to a pointer, whose contents was in some
situations changed by OS (to limit fragmentation). That brought some quite
special programming considerations, which do not apply to normal C pointers
to pointers (and which I _personally_ regarded as a uniquely bad design, but
that's irrelevant here).

_These_ things don't exist in Cocoa anymore. Of course you can -- and
_sometimes_ even should -- use pointers to pointers, and even pointers to
pointers to pointers to pointers or so -- in any API. That does not make them
"handles" though.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: Chris Gehlker <email@hidden>
References: 
 >Re: static typing (Learning Cocoa Chapter 13) (From: Jeff Binder <email@hidden>)

  • Prev by Date: Re: Stopping a DO work
  • Next by Date: Multidimensiaon Arrays in Cocoa
  • Previous by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Next by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Index(es):
    • Date
    • Thread