Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006964 [Squeak] Collections trivial N/A 02-27-08 20:39 02-06-11 23:48
Reporter nicolas cellier View Status public  
Assigned To leves
Priority normal Resolution fixed  
Status closed   Product Version 3.10
Summary 0006964: [clean-up] SequenceableCollection>>startsWith: duplicates beginsWith:
Description
This selector is declared as a *services-base and sent by ServiceShortcuts.

It does the same as beginsWith:, far less efficiently:
1) uselessely creates a subcollection
2) iterates the whole index range when it could answer false at first mismatch

clean it up!
Additional Information
Attached Files  Services-startsWith-cleanup-M6964-nice.1.cs [^] (4,004 bytes) 02-27-08 20:53
 Services-startsWith-cleanup-M6964-nice.2.cs [^] (3,987 bytes) 03-14-08 20:30

- Relationships

- Notes
(0011882 - 199 - 211 - 211 - 211 - 211 - 211)
nicolas cellier
02-27-08 21:03

Ah, forgot to say, SequenceableCollection is the single implementor of startsWith:

I propose in nice.1.cs to move method to deprecated (with a halt: to encourage anyone encountering it to fix it).
 
(0011921 - 126 - 144 - 144 - 144 - 144 - 144)
nicolas cellier
03-14-08 20:31

I was not aware of the #deprecated: message.
It is far better than the halt: I initially proposed.

So here comes nice.2.cs
 
(0013913 - 10 - 10 - 10 - 10 - 10 - 10)
leves
11-07-10 02:57

It's done.
 

- Issue History
Date Modified Username Field Change
02-27-08 20:39 nicolas cellier New Issue
02-27-08 20:53 nicolas cellier File Added: Services-startsWith-cleanup-M6964-nice.1.cs
02-27-08 21:03 nicolas cellier Note Added: 0011882
03-14-08 20:30 nicolas cellier File Added: Services-startsWith-cleanup-M6964-nice.2.cs
03-14-08 20:31 nicolas cellier Note Added: 0011921
11-07-10 02:57 leves Status new => resolved
11-07-10 02:57 leves Fixed in Version  => 4.1
11-07-10 02:57 leves Resolution open => fixed
11-07-10 02:57 leves Assigned To  => leves
11-07-10 02:57 leves Note Added: 0013913
02-06-11 23:48 leves Status resolved => closed


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
49 total queries executed.
35 unique queries executed.
Powered by Mantis Bugtracker