[Grace-core] Minutes of Teleconference 2013-07-24

James Noble kjx at ecs.vuw.ac.nz
Tue Jul 30 10:25:24 PDT 2013


> They are three different things, so shouldn't they have three different methods? 

I guess that's the question, isn't it?   This is why API design is hard and how language design interacts with API design.   

> repeat(n)times(zeroaryblock)
> for(vals)do(unaryBlock)
> withValIndex(vals)do(binaryBlock)

ultimately, familiarity becomes the overriding factor - if we set up the language like this, 
to Grace programmers, these will feel "natural" after a while.    But I'm familiar with Self's 
design, and so I ask why should students have to learn three different requests for the same thing?

J

PS actually I quite like repeat(n)times(block), but here the first argument is a number,
not a "range" or a collection.   And there's still the question of why I can't count from 1-10
via 

repeat (10) times { i -> print(i) } 

rather than 

for (1..10) do { i -> print(i) }

J


More information about the Grace-core mailing list