[squeak-dev] The Trunk: Collections-topa.565.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Mar 25 23:04:22 UTC 2014


2014-03-25 21:41 GMT+01:00 Tobias Pape <Das.Linux at gmx.de>:

> On 25.03.2014, at 21:07, Nicolas Cellier <
> nicolas.cellier.aka.nice at gmail.com> wrote:
>
> > OK, I see this works anyway because ByteString>>at:put: will handle the
> case and use becomeForward:
> >
> > But should we rely on this expectation? It comes from a Smalltalk where
> become: were cheap.
> > For example, WriteStream>>pastEndPut: does not preserve collection
> identity
> >
>
> People rely on this :)
> I actually only got there because a Seaside test failed that made this
> expectation.
>
> Speaking about expectations.
>
> When I have an A, and I say
>
>         WriteStream on: A
>
> I actually expect the stream to be "on" A.
> Become would be ok with me, because the new thing would
> be A still, but the collection replacement that happened
> up until now would not qualify any longer to be "on A".
>
> Regarding #pastEndPut:, yes this is debatable, but sending
> #pastEndPut: clearly shows that the caller is aware that
> the put thing would end up beyond our beloved A. Which makes
> this a mere exceptional behavior (not in general but in regard
> to the "on A" expectation). It's a "here be dragons" situation for
> me, so anything(tm) could happen.
>
> Best
>         -Tobias
>
>
>
Bah, Spur become might become cheaper soon anyway... So expectating
preservation of identity after the most insane mutations might feel less
silly next year (as long as you don't come from haskell or another
functional language).
VW Xtreams implementation did rely on it, even in case of growth...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140326/3407ca5d/attachment.htm


More information about the Squeak-dev mailing list