Tentative change: feedback requested

Peter van Rooijen peter at vanrooijen.com
Tue Oct 12 14:19:41 PDT 2004


Brian Rice wrote:
> I've altered the "VM generate" and "VM buildImage" to take a &named: 
> keyword argument instead of &name: per Ken Causey's request (basically 
> so that it reads more naturally). Are there any votes against this?

Hi!

I don't have a vote :-), but I would note that the pattern of using 
named: to specify that you want something with that name only works for 
certain attributes/properties. A lot of attribute names just don't lend 
themselves to be postfixed with -ed (not even 'name' itself ;-)).

This leads to cognitive overhead where you have to remember when you can 
use the -ed pattern and when you have to say withId: or withOwner: et 
cetera.

Therefore I would suggest using a with<AttributeName>: pattern.

When you are asking for either an existing one or a newly created one, 
this works quite well. When you definitely want a new one, you can use 
newWithId:. When you definitely want an existing one, one might want 
existingWithId: or even oldWithId: (that sounds a but strange but it is 
short and idiomatic with newWithId:).

I know very little about what the usage context of the &named: thing is, 
so my comments may be completely off the mark. Then, since Slate is a 
clean slate thing and I have the impression there is a strong desire to 
be systematic and a willingness (even desire) to break with tradition 
where it fits, perhaps this could still be slightly useful.

Go Slate!

Peter

> -- 
> Brian T. Rice
> LOGOS Research and Development
> http://tunes.org/~water/




More information about the Slate mailing list