On Wed, Aug 9, 2017 at 4:39 AM, Herby Vojčík <he...@mailbox.sk> wrote:
> I've got this portion in my delegate:
> requestPayload ifNotNil: [ uuidKeys do: [ :each |
> requestPayload at: each ifPresent: [ :s |
> requestPayload at: each put: (UUID fromString: s) ] ] ].
> responsePayload := self towergame clientSync: requestPayload.
> responsePayload ifNotNil: [ uuidKeys do: [ :each |
> responsePayload at: each ifPresent: [ :uuid |
> responsePayload at: each put: uuid asString ] ] ].
> Now I would gladly use something like Dictionary >> at:ifPresentTransform:
> aBlock. But it is not present, so I have two choices:
> 1. Add it as extension method, but then it may clash if someone else has
> similar idea.
> 2. Add private helper TowergameDelegate >> dict:at:ifPresentTransform:,
> which is longer and needs additional self receiver.
3. Contribute an implementation into Pharo, which bypasses the problem of
clashing with someone else's package, when they have a similar need they'll
benefit from it already been done. That is assuming such would be a
generally useful feature. It sounds like it to me, but could someone else
support that? Keeping in mind its good to encourage newcomers to step up
to being a contributor and not just a user - expanding the circle of "Pharo
Note though, this will probably only be integrated to Pharo 7. So you'll
need your Baseline to conditional load it for Pharo 5/6 - but thats a good
thing to practice anyway (someone else will need to advise how to go about
it - I'm still getting up to speed on this)