[squeak-dev] The Trunk: Collections-cmm.541.mcz

Frank Shearar frank.shearar at gmail.com
Wed Oct 16 17:37:56 UTC 2013


On 16 October 2013 17:24, Chris Muller <asqueaker at gmail.com> wrote:
> On Wed, Oct 16, 2013 at 10:09 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>> On 16 October 2013 15:53, Chris Muller <asqueaker at gmail.com> wrote:
>>>>>> I realise I'm the guy who touched this last, but it looks completely
>>>>>> wrong. I mean, the new name's an improvement. But we revert the most
>>>>>> recent submission, and then say that we reverted the _new_ most recent
>>>>>> submission... which was surely the _second_ most recent submission?!
>>>>>
>>>>> I don't think so.  A installation of any method, whether by save or
>>>>> revert, makes it the most-recent submission, irregardless of its prior
>>>>> position / existence in the list.
>>>>
>>>> That's my point. Given submissions in order of a, b, c the most recent is c. We revert that, and then ask what the most recent submission is, to display to the user. But most recent now means b!
>>>
>>> It sounds like you're thinking that "most-recent submission" means
>>> "the one with the latest timestamp" but that is not the case.
>>> Timestamps do not come into play at all w.r.t. recent submissions.
>>> It's simply the order of installations of methods, whether the method
>>> is from 2013 or 2002.
>>
>> My point is this: the method submissions _are_ ordered, if nothing
>> else than because they're in an OrderedCollection. (*)
>>
>> So:
>>
>> a := OrderedCollection with: 1 with: 2 with: 3.
>> Transcript showln: 'About to remove ', a last printString.
>> a removeLast.
>> Transcript showln: 'Removed ', a last printString
>>
>> That gives
>>
>> About to remove 3
>> Removed 2
>>
>> Because you removed the last item in the collection! Unless I'm
>> completely mistaken, that's what the Transcripter is currently saying!
>
> Sounds like we're in violent agreement.  That's what I was saying in
> my last paragraph of my last message, (e.g., "The only scenario...").
>
> But, as I said, I was only correcting the method name, not trying to
> fix the scenario of reverting a brand-new method addition.

I know - that's why I said I was happy with your change, and thought
that the basic idea of the _context_ of the change seemed wrong.

>> (*) The pedant in me insists on mentioning that since all method
>> submissions in an image occur from one process, and from a user, that
>> they _are_ ordered by timestamp.
>
> Not necessarily.  They're ordered by the sequence they're installed,
> irregardless of their timestamp.  If you, as a user, revert a 2013
> method back to a 2002 method, the 2002 method is put to the top of the
> list as the "most-recent submission".

And "the sequence they're installed" means "ordered by wall clock
time", assuming a clock that doesn't run backwards. This is what I
mean when I say "timestamp".

So, er, yes, seems like we are in violent agreement. But the method's
still wrong :) It claims to have reverted something that it has not.

frank


More information about the Squeak-dev mailing list