[swift-evolution] End of source-breaking changes for Swift 3

Ted F.A. van Gaalen tedvgiosdev at gmail.com
Thu Jul 28 12:19:07 CDT 2016


Hi Ted ! 

Thanks guys for all for the hard work! 
What you wrote makes sense, is a relief, and gives me faith in Swift’s future!

> The Swift team at Apple has reflected on this and decided what it "means" for Swift 3 to be source compatible with Swift 4 and later releases going forward. Our goal is to allow app developers to combine a mix of Swift modules (e.g., SwiftPM packages), where each module is known to compile with a specific version of the language (module A works with Swift 3, module B works with Swift 3.1, etc.), then combine those modules into a single binary. The key feature is that a module can be migrated from Swift 3 to 3.1 to 4 (and beyond) independently of its dependencies.

This sounds like a reasonable solution...
If I understand you correctly;
   The compiler(s)  would be able to compile sources from 3.0 and future versions?

well, that solves most source breaking issues, 

It then has however the disadvantage that one cannot
combine older  language elements from 
e.g. version 3.0  and 4.0 or higher together in a single source file? 
However, if so, I can live with that.

Does this method have further compatibility issues that at the moment don’t cross my mind?

Unfortunately that doesn’t go back to 2.2, unfortunately
because in 3.0 the classical for ; ; loop will be deactivated.

I regard this as a serious mistake and 
have no doubt this removal is disturbing many 
experienced and more pragmatical programmers.

It made my alarm bells ringing and it was the main 
reason I have climbed in to Swift-Evolution
to discuss this.

      -= Maybe it’s not too late =- 
For the moment the classical for ;;  could simply 
remain activated  (Yes)  in 3.0. because:  
  
  - It doesn’t conflict at all with all other language elements,

  - most important: there are still no good alternative for iterations like these  
       for var x:Float = -60;    x < 60;    x += w * 1.2
       {
           for var y: Float = 130;    y > 60;    y -= backtrack
          // etc.
          // especially for iterations using Floating point numbers!

         for these, one has to fall back on tedious do-while constructs.

  - There are more sane reasons, but a few months ago
     I have written extensively about this subject.

So, yes, obviously my recommendation is 

Please don’t remove the for ;; from 3.0
 
and replace the current compile cry:
    “C-style for statement is deprecated and will be removed in a future version of Swift”

which I currently perceive like this:

   “ The for ;; statement, although being used successfully in many other languages
      is in conflict with the attitude and believe of some of us with a lot of theoretical experience.
     Therefore it will be removed in a future version of Swift. 
     Please resort to using the do-while statement instead.”

the new compiler warning could be then:
  “Warning! This for ;; statement should only be used by highly  skilled 
   programmers with a more pragmatical attitude.
   Use at your own risk, like with any other Swift statement.” 

Just leave it in.  (but I guess it could be to late) 

If it is really removed in 3.0, then I promise I will write
an official  proposal to bring it back in 3.x and further.
some help with that is appreciated.


Kind Regards

Yet another Ted :o) 

www.tedvg.com 





> Date: Wed, 27 Jul 2016 12:38:51 -0700
> From: Ted Kremenek <kremenek at apple.com <mailto:kremenek at apple.com>>
> To: swift-evolution at swift.org <mailto:swift-evolution at swift.org>, swift-evolution-announce at swift.org <mailto:swift-evolution-announce at swift.org>,
> 	swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>>
> Subject: [swift-evolution] End of source-breaking changes for Swift 3
> 
> Dear friends,
> 
> Today is July 27 — and the last planned day to take source-breaking changes for Swift 3. It has been an incredible ride to this point, so let's take stock of where we are. 
> 
 <snip>
> Thank you again to everyone for making Swift 3 such as fantastic release!
> 
> Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160728/fe80dd55/attachment.html>


More information about the swift-evolution mailing list