The Trunk: Collections-eem.758.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-eem.758.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.758.mcz

==================== Summary ====================

Name: Collections-eem.758
Author: eem
Time: 23 June 2017, 12:06:10.238234 pm
UUID: 19a4f20b-1ac9-4bed-9262-1cab35e89afd
Ancestors: Collections-eem.757

Deprecate addNewElement:

=============== Diff against Collections-eem.757 ===============

Item was removed:
- ----- Method: Set>>addNewElement: (in category 'adding') -----
- addNewElement: anObject
- "Ensure anObject is part of the receiver.  Answer whether its membership was newly acquired."
- | index |
- index := self scanFor: anObject.
- ^ (array at: index)
- ifNil:
- [ self
- atNewIndex: index
- put: anObject asSetElement.
- true ]
- ifNotNil: [ false ]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-eem.758.mcz

Tobias Pape
There it is :D

But any reason why not ifNil:ifNotNil: in ifAbsentAdd: ?
Best regards
        -Tobias

> On 23.06.2017, at 21:06, [hidden email] wrote:
>
> Eliot Miranda uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-eem.758.mcz
>
> ==================== Summary ====================
>
> Name: Collections-eem.758
> Author: eem
> Time: 23 June 2017, 12:06:10.238234 pm
> UUID: 19a4f20b-1ac9-4bed-9262-1cab35e89afd
> Ancestors: Collections-eem.757
>
> Deprecate addNewElement:
>
> =============== Diff against Collections-eem.757 ===============
>
> Item was removed:
> - ----- Method: Set>>addNewElement: (in category 'adding') -----
> - addNewElement: anObject
> - "Ensure anObject is part of the receiver.  Answer whether its membership was newly acquired."
> - | index |
> - index := self scanFor: anObject.
> - ^ (array at: index)
> - ifNil:
> - [ self
> - atNewIndex: index
> - put: anObject asSetElement.
> - true ]
> - ifNotNil: [ false ]!
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-eem.758.mcz

Eliot Miranda-2


On Fri, Jun 23, 2017 at 1:20 PM, Tobias Pape <[hidden email]> wrote:
There it is :D

But any reason why not ifNil:ifNotNil: in ifAbsentAdd: ?

No good reason :-).  I won't tell you the reason I wrote it as I did ;-)  Feel free to change it if you feel like it.
 
Best regards
        -Tobias
> On 23.06.2017, at 21:06, [hidden email] wrote:
>
> Eliot Miranda uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-eem.758.mcz
>
> ==================== Summary ====================
>
> Name: Collections-eem.758
> Author: eem
> Time: 23 June 2017, 12:06:10.238234 pm
> UUID: 19a4f20b-1ac9-4bed-9262-1cab35e89afd
> Ancestors: Collections-eem.757
>
> Deprecate addNewElement:
>
> =============== Diff against Collections-eem.757 ===============
>
> Item was removed:
> - ----- Method: Set>>addNewElement: (in category 'adding') -----
> - addNewElement: anObject
> -     "Ensure anObject is part of the receiver.  Answer whether its membership was newly acquired."
> -     | index |
> -     index := self scanFor: anObject.
> -     ^ (array at: index)
> -             ifNil:
> -                     [ self
> -                             atNewIndex: index
> -                             put: anObject asSetElement.
> -                     true ]
> -             ifNotNil: [ false ]!
>
>





--
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-eem.758.mcz

Tobias Pape

> On 24.06.2017, at 03:22, Eliot Miranda <[hidden email]> wrote:
>
>
>
> On Fri, Jun 23, 2017 at 1:20 PM, Tobias Pape <[hidden email]> wrote:
> There it is :D
>
> But any reason why not ifNil:ifNotNil: in ifAbsentAdd: ?
>
> No good reason :-).  I won't tell you the reason I wrote it as I did ;-)  

Ok ;)

> Feel free to change it if you feel like it.
>  
> Best regards
>         -Tobias
> > On 23.06.2017, at 21:06, [hidden email] wrote:
> >
> > Eliot Miranda uploaded a new version of Collections to project The Trunk:
> > http://source.squeak.org/trunk/Collections-eem.758.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Collections-eem.758
> > Author: eem
> > Time: 23 June 2017, 12:06:10.238234 pm
> > UUID: 19a4f20b-1ac9-4bed-9262-1cab35e89afd
> > Ancestors: Collections-eem.757
> >
> > Deprecate addNewElement:
> >
> > =============== Diff against Collections-eem.757 ===============
> >
> > Item was removed:
> > - ----- Method: Set>>addNewElement: (in category 'adding') -----
> > - addNewElement: anObject
> > -     "Ensure anObject is part of the receiver.  Answer whether its membership was newly acquired."
> > -     | index |
> > -     index := self scanFor: anObject.
> > -     ^ (array at: index)
> > -             ifNil:
> > -                     [ self
> > -                             atNewIndex: index
> > -                             put: anObject asSetElement.
> > -                     true ]
> > -             ifNotNil: [ false ]!
> >
> >
>
>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot