> On May 25, 2016, at 1:00 PM, Adriano Ferreira <[email protected]> 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.

-- E


> 
>> On May 25, 2016, at 2:28 PM, Erica Sadun via swift-evolution 
>> <[email protected] <mailto:[email protected]>> 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.

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to