• 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: NSPoint
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPoint


  • Subject: Re: NSPoint
  • From: Pascal Goguey <email@hidden>
  • Date: Sun, 2 Mar 2003 19:14:37 +0900

Hello!


On Sunday, Mar 2, 2003, at 18:14 Asia/Tokyo, Janek Priimann wrote:

Why has NSPoint and various other data types been defined as structs
rather than classes? Is there any good reason for not encapsulating
data like this (how much should be the extent of data encapsulation)?

Overhead would be huge! Can you imagine 'float' as a Cocoa class? :P

Just for fun:
What is the size occupied in memory by an NSPoint? 8 bytes. Not
surprising, it is a structure.
Now, what about a NSView, for instance, ith its huge functionality?
Try it and you will be surprised. Try also with a NSWindow
or an NSWhatYouWant...

Pascal
_______________________________________________
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.

  • Prev by Date: iTunes style table (not alternating colors)
  • Next by Date: Re: NSPoint
  • Previous by thread: Re: NSPoint
  • Next by thread: Re: NSSplitView can't expand once collapsed
  • Index(es):
    • Date
    • Thread