[swift-evolution] What about a VBA style with Statement?
Andrey Tarantsov
andrey at tarantsov.com
Thu Apr 14 13:30:51 CDT 2016
>> I also like the idea of a dedicated method-cascading operator, like what Dart has. It eliminates the need for a programmer to explicitly remember to 'return self' at the end of a chainable method. Not sure how well it'd integrate with SE-0047 (@discardableResult) though.
>
> Method cascades draft: https://gist.github.com/erica/6794d48d917e2084d6ed <https://gist.github.com/erica/6794d48d917e2084d6ed>
>
> deferred to after 3.0
I really think this settles the discussion, because methods cascades are *the* way to implement this kind of thing. (And for the record, I would prefer a SmallTalk/Dart-like syntax to a "with" statement.)
A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160415/f6479cd6/attachment.html>
More information about the swift-evolution
mailing list