• 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: Georg Tuparev <email@hidden>
  • Date: Sun, 2 Mar 2003 11:31:41 +0100

1. Because it is very bad design practice to surround static data structures with objects. It is like 95% of all text books giving class inheritance examples like Mammal->Cat->Tiger. Then the students are let into the real life and start creating separate classes for each of the 4 500 000 or so species. As absurd as it may sound there are many frameworks/applications out there based on this insane design principle. Over 50% of all Talignet classes and the Java exception handling are prominent examples ...

2. Because it is slow and inefficient. Imagine you are writing a protein modeling program with millions of vectors (chemical bonds) and billions of points (electron density clouds). If each vector and dot is an object, you will need gigabytes of ram just to run the program.

gt


On Sunday, Mar 2, 2003, at 07:54 Europe/Amsterdam, email@hidden 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)?

-- georg --

"More Trees, less Bushes!"
_______________________________________________
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.

  • Follow-Ups:
    • NSPoint. The results. Look at that, Georg!
      • From: Pascal Goguey <email@hidden>
References: 
 >NSPoint (From: email@hidden)

  • Prev by Date: Re: NSPoint
  • Next by Date: Re: Prebinding disabled because of TEXT overlap
  • Previous by thread: Re: NSPoint
  • Next by thread: NSPoint. The results. Look at that, Georg!
  • Index(es):
    • Date
    • Thread