[Grace-core] Obejctdraw

Kim Bruce kim at cs.pomona.edu
Sun Dec 29 23:15:05 PST 2013


Where do you want to draw the line between mutable and immutable structures?  I could live with Points being immutable, but could not live with Geometric objects (rectangles, circles, etc.) being immutable.  Points (I still prefer Location or Coordinates, but will concede to Points if everyone else prefers the name) do not represent something actually drawn on the screen, but instead just coordinates, while the geometric objects represent objects drawn on the screen.  I suppose that presents some justification of where to draw the line, but I'm not sure.  Where is the line and what is your justification?

Kim



On Dec 29, 2013, at 2:05 PM, Andrew P Black <black at cs.pdx.edu> wrote:

> 
> On 21 Dec 2013, at 11:17 , Kim Bruce <kim at cs.pomona.edu> wrote:
> 
>> As to Andrew's other "point" (or should I say GPoint), while I am sympathetic to having Point be immutable, if you are allowing the geometic objects to be mutable, then likely you want them to have Points as instance variables.  Thus when you move them, you will need to move those Points rather than create new ones.
> 
> Why?  The same argument would say that if we put x and y coordinates in geometric objects, then we need to make Numbers mutable!
> 
> 
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core




More information about the Grace-core mailing list