Apple Releases Swift 3.0, 'Not Source-Compatibile With Swift 2.3' (infoworld.com)
An anonymous Slashdot reader quotes InfoWorld:
"Move fast and break things," the saying goes. Apple does both with the 3.0 version of its Swift programming language...its first full point revision since it became an open source project... In a blog post detailing the full body of changes for Swift 3.0, Apple singled out the two biggest breaking changes. The first is better translation of Objective-C APIs into Swift, meaning that code imported from Objective-C and translated into Swift will be more readable and Swift-like. The bad news is any code previously imported from Objective-C into Swift will not work in Swift 3; it will need to be re-imported.
The other major change... Most every item referenced in the standard library has been renamed to be less wordy. But again, this brings bad news for anyone with an existing Swift codebase: Apple says "the proposed changes are massively source-breaking for Swift code, and will require a migrator to translate Swift 2 code into Swift 3 code."
Apple will provide migration tools in version 8.0 of their XCode IDE, "but such tools go only so far," notes the article, questioning what will happen to the Linux and Windows ports of Swift.
The other major change... Most every item referenced in the standard library has been renamed to be less wordy. But again, this brings bad news for anyone with an existing Swift codebase: Apple says "the proposed changes are massively source-breaking for Swift code, and will require a migrator to translate Swift 2 code into Swift 3 code."
Apple will provide migration tools in version 8.0 of their XCode IDE, "but such tools go only so far," notes the article, questioning what will happen to the Linux and Windows ports of Swift.
than later when there's a huge code base.
Some drink at the fountain of knowledge. Others just gargle.
I have a pretty decent amount of Swift and the change between this version and previous versions is a lot more to absorb than it has been in the past... the migrator tool does help though it seems like it doesn't do as much as it could (that may have changed from earlier betas though).
However, whatever brief pain this brings upon us, is more than made up by the improvements Swift3 brings to the Cocoa API...
Have you ever worked on an Api for a long time, and thought "if I could do this again I'd rename all this stuff, and structure this one thing differently..."
Well that's one thing Swift3 did for Cocoa - there's basically a whole new name mapping overlay for Cocoa that makes lots and lots of calls much clearer, and also extensions that offer more Swift friendly API calls in some cases.
And the nice thing is some of the mappings are algorithmic, so your own ObjectiveC code you call from Swift benefits from name tidying or simplification, which works out well because of naming conventions Cocoa has long had and almost all Cocoa programmers follow.
There are also specially tweaked mappings to some parts where special cases made the automatic mapping not make sense, so it's like the whole API has had an overview and some re-thought applied.
It is sad that Swift3 could not yet bring ABI stabilization (so you could ship binaries of libraries to other developers and have them work in future Swift updates). But hey, the upside there is that people that want to ship Swift libraries have to give you source - who doesn't want that!
"There is more worth loving than we have strength to love." - Brian Jay Stanley
The courage to move on, to do something new that betters all of us.
The Swift 2.0 language is more than 12 months old. It has its last big innovation about 6 months ago. You know what that was? They deprecated prefix and postfix operations, they made it smaller. It hasn't been touched since then. It's a dinosaur. It's time to move on.
Apple being Apple
If anyone is anoyed by this "Breaking of source" change, feel free to fork the hell out of the project (is open source after all).
Me? I do not speak Swift yet, and for the looks of it, will wait until version 8 or so to start learning.
*** Suerte a todos y Feliz dia!
where we have 5 versions, 3 syntax distinctions, and flipping through them like a rolodex while muttering "what in the name of god does this code need to run" is a time honoured tradition.
Good people go to bed earlier.
The only breaking change worth having in a released language is a compilation error if a space character is surrounded by white space characters. The space character exists in writing to break up words (ie, a series of non-white space characters), and the same should be true for programming. I'd be so happy if that were made a compiler breaking change in all of the major languages. I'd push so hard to upgrade to the latest version for all of them.
Now Apple gets to join in on the fun of deliberately breaking things, especially non-blessed ports.
Twitter supports and protects racists - by smearing their critics with the "Hate Speech" label.
Nobody gets raises for being a cunt. Come up with a plan to fix this in a cost-effective manner, and maybe next time they'll pay attention.
lucm, indeed.
The language just turned two years old, and they've been saying for a while that the language wouldn't be 'stable' until version 3.0.
Nothing is perfect on day one, after all, and Swift borrowed a lot of terribly ugly library methods from Obj-C to make the transition easier. Cleaning all that up for 3.0 will cause some short-term headaches but make future code a lot less cumbersome.
Hopefully from here on the changes will be relatively minor.
How can I believe you when you tell me what I don't want to hear?
And if it takes them under a day to migrate to Swift 3 will you ask for a pay cut?
It's turtles all the way down.
Lol I have seen many projects waste so much time because of swift's BS incompatible updates to do critical things like making the ++ operator a compile error.
If you change enough, then it's almost like a new standard
"Move fast and break things,"
It's such a bad saying that even Facebook has discarded it.
"First they came for the slanderers and i said nothing."
Since Swift is open source, it's already been ported to many platforms. It's on Linux (which Apple officially supported) and Windows and even Android now...
If you are ignoring Swift because of your irrational hatred of Apple, you are only hurting yourself and your future employability. But I do thank you for making it even easier for me to find work.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Look at Slashdot Nerd Rage reactions to the headphone jack being axed and tell me that Apple is not being strong in the face of pain and grief...
Courage was the right word, the world just didn't realize it until the heated reactions all became public and prolific.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Why would he? you don't have this problem with many other languages.
If I want to migrate a C# project from 1.0 all the way to 6.0 it takes me exactly zero seconds of effort.
So it's still a net cost stemming from bad language design, even if only a day. It's not like Swift has anything over C#, in fact, in many ways it's just a clone as most of the features are copied from C# and there's nothing particularly better about Apple's implementation despite being second to market.
Nobody gets raises for being a cunt.
Then how do the higher ups get their jobs?
Wanna buy a shirt?
https://www.redbubble.com/people/stealthfinger/shop?asc=u
Nothing is perfect on day one, after all
I was.
-- Make America hate again!
Now it won't ever be implemented. Shoot we would still be having an IE 6 internet too if it were not for MS forcing corps to stop using it. People hate change and it is impossible unless you kill the original but good luck as Swift is open source
http://saveie6.com/
And it all went downhill from there
Yes. It's not like people weren't warned about this. The Swift 3 announcement at WWDC back in June made this very very explicit indeed, as indeed did swift.org from even earlier.
It's not you: I'm just this horrifically socially awkward with everybody.
... my Stevens unix systems programming book (which applies t to OS/X too) from the mid 90s is still mostly relevant today.
Ah yes because
DoSomething(i);
i = i + 1;
is so much better.
ProTip: This is sarcasm.
Everybody whining here clearly hasn't written any Swift code and is only interested in bashing Apple. Maybe you should be asking what actual people using Swift think of this.
Well, I'll tell you as one.
- The Swift syntax changes are annoying to spend time on, but minor.
- Apple's migration tool is helpful and makes fixing go fast.
- It was no surprise or secret that the syntax was going to change. They said all this upfront and we all knew this was coming.
- Swift on Linux and other platforms only started working less than a year ago. There is not as much code to transition.
Did Chris Lattner lie about stability being pushed back until Swift 4.0, or did he not speak for "they"? How many earlier, missed, binary-compatibility goals have they missed?
And it all went downhill from there
LOL, best retort ever :)
Nobody gets raises for being a cunt.
Then how do the higher ups get their jobs?
They ingratiate themselves to the cunts by being dildos.
Nobody gets raises for being a cunt. Come up with a plan to fix this in a cost-effective manner, and maybe next time they'll pay attention.
Hahahahaha, been living under a rock, haven't you?
Nobody gets raises for being a cunt. Come up with a plan to fix this in a cost-effective manner, and maybe next time they'll pay attention.
You've clearly never worked in a Fortune 500 company. Clearly. (Wow, so many neophytes in this thread. Oh wait, this is an Apple thread... got it.)
What TFS doesn't do a good job of explaining is that with Swift 3, Apple has essentially forked the project into two parts. Besides the newer version 3, Apple is also continuing to develop/support Swift 2.x. The already-released Swift 2.3 is Swift 3's counterpart for developers who would like to stick with Swift 2.x code.
I don't imagine Apple will support Swift 2.x forever. But for the time being, Swift 3 is only as source-breaking as you want it to be. Developers who need Swift 2 compatibility can roll on with 2.3.
timberland pas cher it's ok to wipe it with wet rag. But when it comes to imitated furs such as the black upper of air Jordan, you should pay attention to the dampness of rag. Otherwise it will get worse. But this method can not be employed into shoes with cloth upper such as Nike air Garnett III. Since such uppers find no ways to clean. Then, it would be better to unfasten the ties and wash it, which will make your cleaned shoes more attractive. Last but not the least; you should wear your shoes under natural conditions, say not in rainy day, snow day. Besides, you should change you shoes at regular bases to avoid over-used. In a word, the maintenance of shoes needs care and is worthwhile. Summery: Sports shoes are so popular that almost everyone owns one pair. Some are durable and dear while others are cheap and fragile. But if we maintain them properly, its life can be extended more or less. Based on above, this article chose the maintenance of sports shoes as its objective. The article not only offers some practical cleaning methods but also some tips for attention in the course of maintaining your shoes. copyright by air jordans.
I've always seen Swift as a way of keeping application model logic off of competing mobile platforms/languages, specifically C++ (which Apple supports extremely well on iOS BTW). I view it as the new PowerBuilder --- remember those "LEARN POWERBUILDER OR LOSE YOUR JOB" ads?
How much money did Corporate America p*ss away on PowerBuilder? ... but I digress ...
The company open sourced Swift once it was clear Windows Phone was dead, but now that the app market is in decline, they need to squelch the experiments of the Swift 2.x compilers targeting Android for easy cross platform development.
No. Better never make code breaking changes. You have all the time in the world to make API changes before it becomes public, then it remains fixed.
Paticularly, trivial name changes are bad. It doesn't really matter if the function is called "sort" or "sorted" if you are breaking old code that's bad.
var a = 3
let b = a++ * 3
Now, I expect this type of code is the justification Apple is using to remove the operator; although there is no ambiguity, the line which sets b also sets a.
I argue that prefix and postfix ++ and -- should have remained in Swift. Not only are they well defined, but they are a standard operator in almost all new languages and therefore convey their meaning to the application developer significantly better than += 1 or -= 1 ever could.
For example, when reading code, ++i requires significantly less reading and parsing by the developer than i += 1 to convey the same idea.
A non-programming friend downloaded Swift Playgrounds app on his iPad to learn Swift programming. Not sure why it introduced him to nested functions right off the bat. Anyway, he's frustrated because his code doesn't work and he wants someone else — probably me — to figure out why. I told him if he wanted to be a real programmer he needed to debug his own code before asking someone for help.
Can we have the word "COURAGE" back please
No you can't. Courage ran off with Smart and had a bastard child named Hero.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
There's a difference between stabilizing the language (3.0) and the ABI (4.0).
Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
For anyone that is writing Swift 3 modules (that other people will use in their projects):
You may be interested in this template and recipe that explains how exactly to set up your project and Xcode settings properly.
It is at: https://github.com/fulldecent/... /selfpromo
Hopefully Swift 4 and other updates will not require every developer to redo everything each time.
-- I was raised on the command line, bitch
No, there really isn't. With no alternative implementation of the language, the ABI is inherently part of the language definition. You can't carve out bits and pieces of Swift 3.0 and declare that it's going to be forward-compatible when it won't be.
On top of that, Apple has promised compatibility before, and changed their minds when it was convenient.
Because this wasn't a surprise Apple just dumped on people, this was a well established by the open Swift community.
The core language itself has only really had minor tweaks, how the standard Apple libraries are referenced is what's caused the major change (e.g. not so much the language was horrible in v2 but awkward naming conventions from bridging the Objective-C way of doing things) as well as some naming changes for Swift standard libraries.
Presumably if they went with Swift it was for an iOS/OSX project where Objective-C was the alternative. I find I'm much more productive in Swift than Obj-C, and time spent migrating Swift 2 to 3 for me is dwarfed by the time I saved using Swift.
So to answer your question: If the upgrade doesn't take long he should take a pay cut because: this wasn't a surprise that jumped on them, this was a well known and documented set of upcoming changes that shouldn't take much time to implement - especially given the (not always perfect) migration tools provided.
If the OP wants to say that everyone else is wrong all the time and get a pay raise when he's proven right then he should get a pay cut if he's proven wrong.
It's turtles all the way down.
I'm working on a small mixed Objective-C/Swift project. The API was provided, and is in Objective-C so no changes there. The UI code (i.e. all view controllers) are all in Swift, and consist of about ~30 classes. Moving from Swift 2.3 to 3 was quite easy with the migration tool, and took me about two hours.
8 of 13 people found this answer helpful. Did you?