[swift-evolution] C-style For Loops

Paul Cantrell cantrell at pobox.com
Sun Dec 6 13:08:00 CST 2015


I’d like to express my pure joy at a proposal to _remove_ a feature from a popular language.

My favorite Swift feature? Its brilliant insights that optionality should be a characteristic of _types_ but mutability should be a characteristic of _variables_ are right up there. But no, my favorite feature of Swift so far is its willingness to make breaking language changes. Hallelujiah!

Fear of removing features and making breaking changes is what doomed Java to its current status of “most used, most sneered at.” It’s what’s turned C++ into the world’s largest ball of twine. Swift is wise to set the early precedent of carefully considered breaking language changes.

>> We’ve developed a number of Swift apps for various clients over the past year and have not needed C style for loops either.
> 
> But I think this is a very weak reason for *removing* any portion like C-loops and increment or decrement operators of a programming language.

I cannot imagine a better case for removing a language feature.

We have a feature that is:

1. not widely used,
2. easily replaced with other languages features where it is used, and
3. inconsistent with the language’s general aesthetic.

Theory, observation, and taste agree. If this isn’t a feature to remove for the health of the language, then what is?

Cheers,

Paul

–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
https://innig.net • @inthehands • http://siestaframework.com/




More information about the swift-evolution mailing list