<br><br><div class="gmail_quote">On Tue, Nov 3, 2009 at 1:06 PM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2009/11/3 Andreas Raab <<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>>:<br>
<div><div></div><div class="h5">> Nicolas Cellier wrote:<br>
>><br>
>> While at isSelfEvaluating, I wonder why we do not abuse {..} notation<br>
>> a bit more.<br>
>> Instead of printing 'aSet( 0@0 1@2 )'<br>
>> we could just make it evaluate proof '{0@0. 1@2} asSet'<br>
>><br>
>> Of course, with limited stream, we take the risk of loosing trailing '<br>
>> asSet' information.<br>
>> So we can also print using a less nice but still evaluating 'Set<br>
>> newFrom: {0@0. 1@2}'.<br>
>><br>
>> As a bonus, generalizing this behaviour might also eliminate a few<br>
>> bytecodes and methods from the Kernel.<br>
>><br>
>> Same for storeOn:<br>
>><br>
>> What do you think ?<br>
><br>
> -1. The goal of printing isn't to make parsing easier. In fact I find this<br>
> to be the least useful application of {} - the advantage of the syntax form<br>
> is that it is immediately recognized and consequently requires less effort<br>
> than having "an Array(". That you can also evaluate it in some situations is<br>
> a useful side effect but no more.<br>
><br>
> Cheers,<br>
> - Andreas<br>
><br>
<br>
</div></div>OK, I see ' newFrom: ' can be considered as noise, so we can't have<br>
our cake and eat it too ?<br>
I find the fact that simple objects print as a simple code snippet<br>
such a nice feature though...<br>
Set << {0@0. 1@2} would be short, but I guess introducing a new binary<br>
selector will be hard to sell :)<br></blockquote><div><br></div><div>yuck. asSet is readable and in the Smalltalk tradition. << sMLells ;)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
Nicolas<br>
<br>
</font></blockquote></div><br>