[squeak-dev] Promise resolve

Marcel Taeumel marcel.taeumel at hpi.de
Fri Dec 14 09:15:34 UTC 2018

Sounds good. There are many classes in Squeak with similar convenience messages. 


Am 14.12.2018 10:12:10 schrieb patrick.rein at hpi.uni-potsdam.de <patrick.rein at hpi.uni-potsdam.de>:
Hi everyone,

during a project some students recently used Promise objects a lot. Due to the nature of the project, they often wanted to resolve a Promise without a value. As there is no #resolve method they resorted to `resolveWith: nil`. As this is rather ugly, I would like to propose an additional (convenience) method #resolve which simply resolves the Promise with the value nil. This would also mirror the #then: protocol as the resolve block does not have to accept the argument passed by the promise.

A downside of this proposal is that the protocol of Promise is currently quite lean and the method does not add anything substantial.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181214/e49185bc/attachment.html>

More information about the Squeak-dev mailing list