News for hackers. Stuff that matters.
Re:What's new in Swift 3.1 by melling on Thursday January 26, 2017 @03:22PM (#13494939)
It was a bit of work but I would say that it was worth all the changes. I like Apple's preference to make breaking changes to make the language better.

Apple wrote a decent conversion tool for 2.x -> 3.x; yes it is far from perfect.

Btw, I documented most of my changes on my blog, in the hopes that the next person would be able to make their changes in half the time:

https://h4labs.wordpress.com/2016/09/17/my-ios-10-and-swift-...

Everyone using Swift will soon be on version 3.x. Compare this to languages like Python where there will need to be a major 2020 conversion to 3.x because many developers are dragging their feet.

The community needs to accept a little pain or pay for past language design mistakes for decades.

Re:What's new in Swift 3.1 by hota_mazi on Thursday January 26, 2017 @03:59PM (#13495204)
> Compare this to languages like Python where there will need to be a major 2020 conversion to 3.x because many developers are dragging their feet.

That's not a very fair comparison. Python is 25 years old and this migration is being requested after 20 years in existence. There is no way a successful language can perform this kind of migration at that age without pain. Swift will be no exception if it's still around and popular in 20 years.

Re:What's new in Swift 3.1 by melling on Thursday January 26, 2017 @04:26PM (#13495375)
Yes, I understand that the conversion is in some ways more difficult because there's a larger legacy code base. However, the conversion has already been extended 5 years:

https://news.ycombinator.com/item?id=7581434

A decade long conversion is fine if that is what the community wants. There are certain drawbacks to this.

I simply like the aggressiveness that Apple has taken. The community can put "all its wood behind one arrow".

Re:What's new in Swift 3.1 by hota_mazi on Thursday January 26, 2017 @04:58PM (#13495619)
I like the aggressiveness too but it's pretty common for very young languages because the cost is so low. Swift is not doing anything new there.
Re:What's new in Swift 3.1 by melling on Thursday January 26, 2017 @05:45PM (#13496040)
Really? I've been programming for almost 35 years and I can't think of many languages that made such big changes. Java, for example, is still compatible with 1.0.
Re:What's new in Swift 3.1 by hota_mazi on Thursday January 26, 2017 @06:39PM (#13496449)
Java is one language among hundreds that have come out these past twenty years.
Re:What's new in Swift 3.1 by melling on Thursday January 26, 2017 @08:04PM (#13496897)
Yes, I know that. You could provide your examples of some other popular languages that we all know about. Sure, it's easy to change a language no one uses, but when you've got hundreds of thousands of users, it's much harder.
Re:What's new in Swift 3.1 by breatheoften on Thursday January 26, 2017 @09:08PM (#13497166)
pain(x) = Language upgrade pain after x years of development. That seems like a somewhat objective concept -- about which it is fairly hard to make guesses ... If I _had_ to guess though, because of the static type system and the process guiding swift's evolution, I would hazard that Swift 23 -> Swift 24 will be significantly easier than python 2 -> python 3 ...
Re:What's new in Swift 3.1 by ploxiln on Thursday January 26, 2017 @06:33PM (#13496418)
> Xcode 8.3 drops support for Swift 2.3. So, if you were holding back on your migration to Swift 3.x, now is the time to make the switch!

Python 2.x keeps working pretty well for many large backend-service codebases that need a lot of stability.

Swift 2.x is used for iOS and macOS client/UI apps that get significant UI "enhancements" every year. The stability desire is much less, in every sense.

Re:What's new in Swift 3.1 by nodamage on Thursday January 26, 2017 @07:54PM (#13496856)
iOS developers are also (for better or worse) already used to things breaking every year when a new iOS release rolls around.
Re:What's new in Swift 3.1 by valuearb on Friday January 27, 2017 @01:27PM (#13501512)
Migration isn't that hard, and it's worthwhile.