[swift-evolution] ternary operator ?: suggestion
jtbandes at gmail.com
Sun Jan 17 18:34:04 CST 2016
I'm a little bit surprised that this discussion has lost track of the idea
of turning "switch" into an expression rather than a control-flow
statement. Chris has expressed that he and other team members would like to
It was discussed a bit on the original version of this thread:
And in "Control Flow Expressions":
I've seen this ternary-operator discussion branching out in various
directions and yet it slowly seems to converge back on "make it as similar
to the existing switch statement as possible".
Was switch-as-an-expression intentionally dropped from consideration, in
favor of adding new syntax? If so, I may have missed that piece of the
discussion, and would appreciate if someone could point me to it.
On Sun, Jan 17, 2016 at 4:08 PM, Craig Cruden via swift-evolution <
swift-evolution at swift.org> wrote:
> Another attempt on motivation to thread the needle.
> On 2016-01-18, at 3:04:35, Charles Constant <charles at charlesism.com>
> I think examples are convincing, but ideally we would put most of them in
> separate document.
> Though I love reading about programming, I generally do it in a half-assed
> sort of way. Unless the writing is very blunt and clear, I don't really
> understand it until I need to do it myself. I doubt I'm the only person
> here like this.
> I badly want this proposal to gain traction (more so every time I find
> myself writing code that it could improve, which happens daily). I think
> the proposal ought to be short and sweet. I believe if we hold the reader's
> attention just long enough for them to understand what we're talking about,
> they'll be onboard. Once they're hooked, we have our second document with
> the list of examples.
> It would also be great to have the "before snippet" and "after snippet"
> visually arranged side-by-side. I'm guessing markdown doesn't support this
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution