[squeak-dev] The Inbox: Collections-mt.832.mcz

Tobias Pape Das.Linux at gmx.de
Fri May 10 16:18:05 UTC 2019


> On 10.05.2019, at 17:46, Chris Cunningham <cunningham.cb at gmail.com> wrote:
> 
> 
> 
> On Fri, May 10, 2019 at 5:53 AM Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> So, there are two questions:
> 
> 1) Name it #take: or #any: or #slice:?
> 2) Signal an Error (or Notification) if there are not enough elements in the collection or just compensate (less elements or duplicate elements)?
> 
> I think the point of the original commit was to NOT signal an Error if there weren't enough elements - otherwise #first: would have worked (mostly).  The idea is "I want 4, or whatever you have if you don't have that many".

but #first does not work for Sets, Dictionaries and the like.

I'm in for an Error-throwing #any:.

Reason: 
what we have as #first on Sequenceable is more generally available on Collection as #anyOne .
what we have as #first: on Sequenceable could be more generally available on Collection as #any:.

Best regards
	-Tobias


More information about the Squeak-dev mailing list