[Grace-core] Obejctdraw

PSU via GMail andrew.p.black at gmail.com
Sun Dec 22 17:09:46 PST 2013



Sent from my iPad

On Dec 21, 2013, at 14:40, James Noble <kjx at ecs.vuw.ac.nz> wrote:

> 
>> The question is where to put the simplicity - in the library or in the application that uses it.  Kim's line example illustrates the point (ugh).  My making the library simpler, you make every app that uses it more complex -- James' clock face, for example.
> 
> Right.  But how to do that, where to draw the line is the key. I like the idea of "graceful" libraries that somehow embody the design aesthetics of the language, but I'm not at all sure how to do that. 
> 
>> Python's turtle library is huge.  The way that we dealt with this in our class was to produce simplified documentation that covered only what the students would need for this assignment.
> 
> OK - which makes sense in Python with existing libraries. I guess if we succeed we'll eventually get big, but we don't want to start that way. 
> 
> And if graphics are bad, collections will be worse!
> 

Perhaps what we should strive for, both for graphics and collections, are "language levels" for the libraries.  Minimal vec2d, minimal lists, minimal graphics objects to start teaching.   And then expanded versions of each to enable real programming later.

One example of this is a collection method that set me thinking when I first encounter it in Smalltalk — do:separatedBy:   You immediately know what it's for, and when you want to print, say, a comma separated list, it makes the job trivial.  But I. Every other language that I had used, it was a pattern that I had to code up from scratch every time I needed it.  The same goes for folds, which encapsulate the accumulator pattern: in an intro class, the instructor probable wants to teach tees patterns and have the students code them up out  of whole cloth and only later introduce them as methods in the library.

Andrew




More information about the Grace-core mailing list