[self-interest] value, value:, etc in defaultBehavior
David Ungar
ungar at me.com
Thu Dec 22 16:43:21 UTC 2011
What is the value of 17? Or of 'foo' ? We thought it made sense that the value of 17 is 17.
That way you can write: max: x = ( > x ifTrue: self IfFalse: x )
without square brackets. The value method gets inlined out, anyway.
After all, 17 knows it's not a block.
- David (from iPad, typos likely)
On Dec 22, 2011, at 8:12 AM, Thorsten Dittmar <thormar at me.com> wrote:
> Hello folks,
>
> I was always wondering why value and value with parameters was implemented in defaultBehavior and not in the trait block. Of course, that can make some stuff easier, but it looks a little bit like a dirty hack. Would be nice, if somebody can tell me a little bit the background of this implementation.
>
> thx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20111222/f90ea23f/attachment.html>
More information about the Self-interest
mailing list