[Seaside] StateHolder
Masashi Umezawa
umejava at mars.dti.ne.jp
Wed Mar 5 01:08:37 CET 2003
Hi,
> Actually, In Squeak, ValueHolder uses #contents, #contents:. This is at
> odds with other Smalltalk implementations. I wonder how this situation
> came about.
>
Oh... I haven't noticed that. But ValueHolder in Squeak is very unpopular.
(only a few class references). And since Seaside is somewhat conscious
about the portability, I think the protocol should be #value/#value:.
> Actually, since there is ambiguity in the #value: message (blocks treat
> the argument as a parameter, whereas value holders and associations
> treat this message as a setter), I'd be open to changing these selectors
> to something like:
>
> #value:
> #value
> #valueWith:
> #valueWith:with:
> ...
> #valueWithArguments:
>
> In this way, different objects could choose which of these methods is
> appropriate for them (i.e. ValueHolders and Associations would implement
> #value: and #value; blocks would implement everything but #value:; etc).
> Any objects that allow the answer to #value to be set directly would
> implement #value: and valuables that accept a single argument would
> implement #valueWith: (instead of #value:). The messages #valueWith:
> and #valueWith:with: even seem clearer to me than #value: and
> #value:value: (which would seem to indicate that I'm evaluating the
> receiver twice).
Interesting. I admit that there is some ambiguity. But in VW, when
PluggableAdaptor is used as a ValueModel, its semantics come closer
to BlockClosure (because it is actually evaluating setter/getter blocks).
Thanks,
---
[:masashi | ^umezawa]
More information about the Seaside
mailing list