O > > Currently: > > (3 to: 2) first -> 3. > (3 to: 2) last -> 2. > > But: > (2 to: 4 by: 3) last -> 2 > > Try to guess the logic behind this…
;D > >> >> I see. But does it make sense to have (thinking aloud)? >> (3 to: 2) start -> 3 >> (3 to: 2) end -> 2 >> probably? > > Yes, I did that refactoring in Squeak 3.9, but I was sure it would be > rejected, too many methods were changed (TextMorph ParagraphEditor & > co). See http://bugs.squeak.org/view.php?id=6454 > > You also know that breaking the classes we use for browsing/debugging > is a dangerous sport ;) oh yes like CharacterScanner and Event :) > The simplest thing would be to add a few message to TextLineInterval > (first, last, ...) and move it somewhere else in hierarchy, because I > don't think it shares that much with Interval. > - I guess we don't use much of Collection protocol in TextLineInterval > - it spoils first/last uniformity > - it can't handle Interval step > - ... > >> >> So we should improve that. >> If what I said is correct and you confirm it I will open a bug entry >> Stef >> >> > > I found http://bugs.squeak.org/view.php?id=7002 indicating that most > weirdness of Interval were corrected, but I'm quite sure it still has > other reported or non reported bugs, except hash. > > I can still do an infinite loop with to:do: and Float, > 2 - Float epsilon to: 2 by: Float epsilon/4 do: [:i | Transcript cr; > show: i printString] > > but Interval>>do: is correct: (well I warned you, some rounding occurs...) > (2 - Float epsilon to: 2 by: Float epsilon/4) do: [:i | Transcript cr; > show: i printString] > > For hash, I wonder if it would not be easier to just drop #(2 3) = (2 > to: 3) and let it answer false. > We have hasSameElementsThan: or isSameSequenceThan: for that purpose. If you have changes that you want to propose for Pharo please go. I think that I will spend most of my charisma holidays fixing bugs :) Stef
