[swift-evolution] [Pitch] Circling back to `with`
dsa.mls at icloud.com
Wed May 25 18:34:38 CDT 2016
> Le 25 mai 2016 à 14:28, Erica Sadun via swift-evolution <swift-evolution at swift.org> a écrit :
> 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:
> If the community demand is this high, I think we should re-consider pushing it before 3.
> Feedback as always welcome, including criticism.
Recently there was another possible 'with' variant:
- instead of being a: with 'instance' create new 'instance' using 'closure'
- it was a: with(/on) 'instance/s' perform 'closure' (same idea as the closure-based initialization, described in the motivation)
The thread "What about a VBA style with Statement?": http://thread.gmane.org/gmane.comp.lang.swift.evolution/14384
In either case the 'with' can be misleading/confusing; with, on its own doesn't suggest creation of a new entity, nor does it strongly suggest possible mutation.
Just mentioning it as to end up... with the proper name for this new function.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution