• 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: Strong language about Cocoa and Qt.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strong language about Cocoa and Qt.


  • Subject: Re: Strong language about Cocoa and Qt.
  • From: Dan Sugalski <email@hidden>
  • Date: Tue, 1 Jul 2003 13:30:29 -0400

At 12:58 AM +0900 7/2/03, Rich Warren wrote:
Private Methods/Variables:

I assume (though I haven't really tried) that you can hide a method (by
putting it in a category instead of in the header file), but you can't
prevent people from calling it.

Similarly you can declare a variable as private, but others can still write
code that slips around that.

The inability to really lock down my private functions and data, and keep it
away from prying and probing fingers makes me uneasy. It probably shouldn't.
After all, I'm writing applications, not libraries. But the c++/java habits
of locking down the classes is heard to break.

FWIW, I'll point out that you can't do this in C++ either. (Dunno about Java, as I don't do Java) It's a bit of a pain, but only a bit, to get past the language-declared lockdown stuff. I don't know if people do it all that often, but it is reasonably simple to do. (It's just a matter of pointer math, proper casts, and knowing your compiler's close-to-completely-standard behavior after all...)
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
email@hidden have teddy bears and even
teddy bears get drunk
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Strong language about Cocoa and Qt. (From: Rich Warren <email@hidden>)

  • Prev by Date: Re: Jaguar/Panther compatibility
  • Next by Date: Re: Runtime question - Special requirements to register overridden methods?
  • Previous by thread: Searching Documentation (was Re: Strong language about Cocoa and Qt.)
  • Next by thread: Re: Strong language about Cocoa and Qt.
  • Index(es):
    • Date
    • Thread