[Newbies] A do with ONLY index? (plus,. a style question)

Todd Blanchard tblanchard at mac.com
Sun Feb 4 17:15:46 UTC 2007

On Feb 4, 2007, at 12:35 AM, Blake wrote:

> But not descend from Array?

I would not as you run the risk of mixing concepts.  Arrays are 1D so  
new: expects an integer.  You want to make a new: that takes a point  
and have an entire interface written in terms of 2D.  It can get  
messy if you're trying to keep track of which method is 1D vs 2D  
oriented.  IMO, best to keep your interface minimal and specific,  
implementing it with an internal array.

In general, inheritance is overused as a composition mechanism.   It  
should be the last resort, not the first.

-Todd Blanchard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20070204/444f005a/attachment.htm

More information about the Beginners mailing list