[swift-evolution] [Idea] Deprecate the 'default' keyword.

Ross O'Brien narrativium+swift at gmail.com
Sat Feb 27 10:39:52 CST 2016

I'm going to create a formal proposal for this.

On Sat, Feb 27, 2016 at 3:56 PM, Антон Жилин <swift-evolution at swift.org>

> I agree with replacing `default` with `else`.
> First of all, `default` or `by default` is generally associated with some
> initial value, before any customization. `default` in `switch` is just a
> borrowing from C. A newbie programmer will better get used to `else` than
> to `default`.
> Secondly, `switch` in Swift is almost the same as a sequence of
> `if-else-if` (not just a table, as in C). `else` in `switch` would create
> an association with last `else` in that chain.
> Thirdly, `else` lines up nicely with `case`. You need to try it to feel
> the difference.
> Go ahead and create a formal proposal for this, or shall I do this?
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160227/f75cae3c/attachment.html>

More information about the swift-evolution mailing list