[Grace-core] Obejctdraw

PSU via GMail andrew.p.black at gmail.com
Fri Dec 20 12:34:20 PST 2013


On Dec 21, 2013, at 9:04, Kim Bruce <kim at cs.pomona.edu> wrote:

> The ACM Java graphics library uses GPoint.

I looked at GPoint.   It's mutable, which I'm sure is just WRONG.   It has one non-trivial method, translate, which is like + except that the argument is an xy pair instead of a GPoint.  (This is Jave, so  they can't call it +.).  Nothing here to imitate that I can see.

I think that there are two philosophies for libraries.  One is to make them minimal, so that students can see the WHOLE of every interface, and can be given assignments to enhance them (once we figure out how to open classes).  The other is to make them rich, so that students can learn to read documentation, and write interesting apps that USE the libraries.    An example in Graphics might be asking a point which side of a line it lies on.   This is a primitive in many algorithms, like convex hull; should it be "given" to students, or should they write it?  An example on collections is do()separatedBy(), which is frequently useful for manipulating a collection, e.g., printing a list.

We should talk about this philosophy before talking about a particular case.  

     Andrew


More information about the Grace-core mailing list