[PEAK] Lessons from the new API
Jeffrey Harris
jeffrey at osafoundation.org
Tue Apr 15 19:57:23 EDT 2008
Hi Phillip,
> foo = trellis.attr(make=dict)
The 'make' keyword sounds great, clear and helpful.
> variable -> attr
> variable.attributes -> attrs
> variable.attributes.resetting_to -> resetting_attrs
>
> compute.attributes -> compute.attrs
> maintain.attributes -> maintain.attrs
>
> * add a 'make' keyword to 'maintain()'
> * add a 'make()' attribute type, to allow you to create optional
> computed values, that can be declared writable
> * add a 'make.attrs()' callable, to allow creating multiple make()
> attributes
All sounds good.
> I am somewhat tempted to also shorten 'compute' to 'calc' and 'maintain'
> to 'ensure'. But that's probably pushing it. On the other hand,
> 'calc' seems a bit more like it means "side-effect free". So I'm open
> to feedback on that, or other suggestions for how to name the central
> words.
For some reason I much prefer a full verb form to 'calc', perhaps it's
because my main interaction with 'calc' is when I occasionally run MS
calc using calc.exe, so I don't think of it as a verb...
I agree calculate sounds more "side-effect free" than compute, but it
seems marginal to me, maybe not worth the extra two characters.
I'm ambivalent on 'maintain' vs. 'ensure', they both seem reasonably clear.
Sincerely,
Jeffrey
More information about the PEAK
mailing list