[swift-evolution] [Pitch] Circling back to `with`
erica at ericasadun.com
Wed May 25 14:05:13 CDT 2016
> On May 25, 2016, at 1:00 PM, Adriano Ferreira <adriano.ferreira at me.com> wrote:
> Hi all,
> I really like this idea and appreciate the effort. However, I’d rather have a method similar to Ruby Object#tap <http://apidock.com/rails/Object/tap> and not a free function.
> Well, since there’s no "Object class" in Swift, the way I see it is through a protocol, much like the Then <https://github.com/devxoul/Then> project is done.
> — A
In Swift, there's no root object like NSObject, which is what the Then project relies upon. I'm unfamiliar with `tap` but it looks
similar to method cascading, which is on hold for Swift 4.
>> On May 25, 2016, at 2:28 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> Over the past couple of days, the Twitters have discovered some work I'd done on closure-based setup.
>> It's clear that a demand is out there and strong for this kind of behavior, even without implicit `self` as
>> part of the mix or cascading. In that light, I've put together the following:
>> https://gist.github.com/erica/96d9c5bb4eaa3ed3b2ff82dc35aa8dae <https://gist.github.com/erica/96d9c5bb4eaa3ed3b2ff82dc35aa8dae>
>> If the community demand is this high, I think we should re-consider pushing it before 3.
>> Feedback as always welcome, including criticism.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution