Slashdot Mirror


Apple's Swift 4.0 Includes A Compatibility Mode For 'The Majority' Of Swift 3.x Code (infoworld.com)

An anonymous reader quotes InfoWorld: Swift 4.0 is now available. It's a major upgrade to Apple's Swift, the three-year old successor to the Objective-C language used for MacOS and iOS application development. The Swift 4 upgrade enhances the Swift Package Manager and provides new compatibility modes for developers. Apple said Swift 4 also makes Swift more stable and improves its standard library. Swift 4 is largely source-compatible with Swift 3 and ships as part of Apple's Xcode 9 IDE...

Swift 4's new compatibility modes could save you from having to modify code to be able to use the new version of the compiler. Two modes are supported, including the Swift 3.2 mode, which accepts most source files built with Swift 3.x compilers, and the Swift 4.0 mode, which includes Swift 4 and API changes. Apple said that some source migration will be needed for many projects, but the number of source changes are "quite modest" compared to many previous major changes between Swift releases.

Apple calls Swift 4.0 "a major language release" that also includes new language changes and updates that came through the Swift Evolution process.

122 comments

  1. The *majority* of code by Hognoxious · · Score: 2, Funny

    Don't you just love things that nearly always work?

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    1. Re:The *majority* of code by Dutch+Gun · · Score: 4, Insightful

      I used to be somewhat critical of the compatibility-breaking change of Swift, but I'm wondering if this isn't a decent approach for the long-term benefit of the language. It certainly seems to be better to make incompatible changes early in the language's adoption life cycle than to wait too long, then break things, which causes a lot of problem when there's a huge existing body of source code. Moreover, everyone was warned well in advance that Swift would be making changes up to at least version 3 (and apparently, slightly beyond), so it's not like this should catch developers off guard.

      I'd imagine the benefit of making changes post-release is that you can account for real-world feedback based on actual experience with the language, rather than purely theoretical designs. I'd have to think this makes for a better language in the long run.

      The big caveat here is whether the Swift developers stop tinkering with the core language and allow it to stabilize for the long term, at least in terms of backwards compatibility.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    2. Re:The *majority* of code by Anonymous Coward · · Score: 1

      As a developer, I much prefer compatibility breaking improvements than maintaining compatibility and never making it around to improvements. If developers were better at collaboration and managing chaos (maybe if we were psychic and never changed jobs hah), I think breaking compatibility would be the more popular choice.

    3. Re:The *majority* of code by Hentes · · Score: 2

      At least Python only breaks compatibility every 10 years or so, not on an annual basis. And the transition from 2 to 3 was handled pretty well, with __future__ allowing devs to write forwards compatible code before the switch, a 2to3 converter that mostly automated the migration itself, and continued development of the 2 branch afterwards. As for people arguing about changes that's true for every feature in every language and has little to do with compatibility.

    4. Re:The *majority* of code by K.+S.+Kyosuke · · Score: 1

      Automated migration, anyone? Like Go seems to offer? I don't think it's impossible to accomplish.

      --
      Ezekiel 23:20
    5. Re:The *majority* of code by Hognoxious · · Score: 1

      I almost put "nearly" in italics. Probably should have done.

      Incompatibility per se[1] isn't the issue. It's this #smegma or whatever it is that doesn't work for the *minority* of code. In what way does it not work? Compiler warning[1]? Compiler error? Just do random shit?

      [1] Who takes notice of those?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    6. Re:The *majority* of code by Anonymous Coward · · Score: 0

      Don't like it? Complain to management. Bitching about it here in the comments doesn't change anything.

      (Where have I heard that before...?)

    7. Re:The *majority* of code by Anonymous Coward · · Score: 0

      As a protohuman I don't like to think either. It's much too inconvenient and requires a bit more energy than I'm willing to expend. Plus, it cuts sales.

    8. Re: The *majority* of code by Anonymous Coward · · Score: 0

      Where's the source code to your Python script chris? Why don't you post it chris? I bet if it came with an affiliate link you would post it Chris.

      Also, we found your new iPad with gay erotica fantasy ebooks chris. No sign of any Python script though chris.

      We are super close to finding out your whereabouts. We are within a half mile radius. We got our hands on a stingray from the dark webs. Keep posting and using your phone so we can narrow it down. You have been a huge help chris.

    9. Re:The *majority* of code by Dutch+Gun · · Score: 2

      My response was slightly tangential to your point, I suppose. Yeah, I agree an issue is definitely the behavior of that "nearly." If it simply flags an error, no problem - you correct it manually and move on. If it's more ambiguous, then that could be a problem. I looked at the linked article, and didn't see an immediate answer to this. Not that affects me in any way, of course, as I'm not using Swift. Objective-C is far better at interop between my C++ code and the Cocoa APIs, so that's what I'll continue to use.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    10. Re:The *majority* of code by dottrap · · Score: 3, Informative

      This doesn't break shipped apps. Any app using Swift right now deliberately has everything compiled and bundled to be self-contained. Changes to Swift have no impact on shipped binaries.

    11. Re:The *majority* of code by 93+Escort+Wagon · · Score: 1

      I don't think you're a developer, cos we know that breaking existing products already in the users hands is a good way to stop sales.

      How many end-user products are still in (Swift) source code? And, if such products are not common - how do language changes affect already-compiled products?

      --
      #DeleteChrome
    12. Re:The *majority* of code by Anonymous Coward · · Score: 0

      Hey Creimy-Dumpty!

      How did that transition feel?:
      https://www.youtube.com/watch?...

      No transition occurs here:
      https://school.discoveryeducat...

      About when you transitioned to your adult chair?:
      http://www.keynamics.com/image...

    13. Re:The *majority* of code by BasilBrush · · Score: 1

      XCode always offers auto migration for new Swift versions. Deals with the easy stuff. In most cases will deal with everything.

    14. Re:The *majority* of code by Anonymous Coward · · Score: 0

      Since you always talk about "enterprise-level" closets, "enterprise-level" offices, "enterprise-level" chairs, "enterprise-level" snacks, etc.:

      Why don't you just use an "enterprise-level" language you silly? Applications written for java 1.0 in 1997 still run fine without a change on a 2017 java 8 installation.

      "enterprise-level" chair:
      http://www.keynamics.com/image...

      Maybe "enterprise-level" goofs are unable to use "enterprise-level" languages!:
      https://school.discoveryeducat...

    15. Re:The *majority* of code by Anonymous Coward · · Score: 0

      For the valuable /. users that might already have read the following, please note that there is an important update.

      IMPORTANT UPDATE:
      Special Education for the Santa Clara County Office of Education has invested money to buy Chris a new chair:
      http://www.keynamics.com/image... [keynamics.com]

      Information about Christopher Dale Reimer and autistic people:

      Autistic people have obsessions about things normal people don't care. For example, one of our autistic patient went haywire when he realized that there was a penny missing in his pocket change.

      To calm him down, one of our educator pretended to have found it on the floor and gave a penny to him.

      The autistic patient condition went even worse because he realized it wasn't the same penny!

      Chris has an obsession with budgeting every penny. He doesn't understand that most people do not budget to the penny and have a flexible amount they allow for miscellaneous items.

      I am Nancy Guerrero and I am Director of Special Education for the Santa Clara County Office of Education. We use Chris' (a.k.a. creimer,cdreimer) picture in our document because he is the hardest case we have ever had to handle:
      http://www.sccoe.org/depts/stu... [sccoe.org]

      Our artists were inspired by the low carb diet that Christopher follows scrupulously for the small lunch box and by the picture linked below for the rest. I am sure that you will notice the similarities such as the bump on the side of his chest and more:
      https://ibb.co/gVad65 [ibb.co]

      Please be easy on Christopher although, I am aware that some of our staff handling Chris post joke comments here and obvoiusly, the Santa Clara County Office of Education disapprove that behavior vehemently:
      https://school.discoveryeducat... [discoveryeducation.com]

      But it isn't Chris' fault if he is the way he is. We do the best we can do with him and he is partially integrated into society. We try to cure his abnormal need for attention but he is kind of stubborn and won't listen to anybody.

      Thank You dear users,
      -Nancy Guerrero

    16. Re:The *majority* of code by Anonymous Coward · · Score: 0

      They're still arguing on the python email list about changes that were made ten years ago

      I thought that you were a highly rated contributor,commentator and moderator on the python mailing list so why don't you use "we"?

      IMHO, it should be:
      We're still arguing on the python email list about changes that were made ten years ago.

    17. Re:The *majority* of code by Anonymous Coward · · Score: 0

      There you are you disgusting fat sexist tube of lard, Christopher Dale Reimer!

      You can be sure I will be watching this fake account too. I know this is you because you told me you were working on your freepass 11 file server and you are so dumb that you can't even masquerade yourself properly.

      Now, I told you I was out of meds last week and you didn't even care to contact me you lazy fucker.

      How many time do I have to express the emergency of the situation??????

      The python click script you wrote for my pheromone revenue stream web site suddenly stopped to work!!!!!!

      You fucking incompetent python script writer!!!

      When it works, I get 4000+ clicks a day on my pheromone revenue stream web site but only 5 or 6 without it!!!!

      Now, it seems like you dont care and that you have abandoned me you heartless fucking pig!

      Bonus:
      Here is a story that creimer told me when convincing me what a hard life he had:

      The tree was him and the tree knot was his butt hole!

      So, his uncle packed his fat ass with lard and with his cock! Not that it makes much of a difference but anyway, there it is!

      Signed:
      The girl that used to love you and now hates you, burn in hell where you belong you sexist pig!

    18. Re:The *majority* of code by Anonymous Coward · · Score: 0

      Sorry, pre-caffeine comment.

    19. Re: The *majority* of code by tysonedwards · · Score: 1

      Swift bundles itself into the build artifacts. As such, when something changes in the language, you can change your build target if you care or you can continue as you have. The drawback with this approach is that you may have a dozen copies of a distinct Swift version on your device to run your programs.

      --
      Thirty four characters live here.
    20. Re: The *majority* of code by Anonymous Coward · · Score: 0

      Apple rant from previous thread...

      All iphones are always 4 years behind android on tech... If you buy an iphone that is say 2 years old... Then you Will be essentially buying 6 year old tech! Not to mention the fact that Apple often both severly handicap the tech they "invent" 4 years after the last android manufacturer joined the wagon... They also often make a half assed implementation as evident by all the "secret" iOS bugs that you isheep think nobody knows about! Android phones have better tech, earlier and often much better implemented ... To boot the android versions of tech are a standard so it works with everything Else.. Even non android devices.. Iphones and iOS are for people who have no cluster about tech... It is so damn obvious!

  2. Swift is doing great. Go is doing great. But Rust? by Anonymous Coward · · Score: 0

    Over the last 5 years there have been three main rising stars within the world of programming languages: Swift, Go and Rust.

    This summary shows that Swift is doing great. The language is evolving, and it's being used to write a lot of great mobile apps and other software. Swift is clearly becoming a mature language that's usable for large, important projects. It has the backing of Apple, one of the most successful companies that has ever existed.

    We're seeing the same thing happening with Go. Each release is bringing up some great new functionality, and some great software is being written using Go. It has the backing of Google, another major player in a variety of technology-oriented fields.

    Then there's Rust. It was perhaps the most hyped of the three, getting a huge amount of attention despite being perhaps the least developer-friendly of the three. It took a long time to finally get to the 1.0 release, and once that happened it's like the language has fizzled out. There's not as much hype about it. Major projects written in it, including Servo and the Rust implementation itself, haven't really gone anywhere. It probably doesn't help that moz://a is involved with it, as some people see moz://a as a somewhat misguided organization these days.

    Why have Swift and Go been such roaring successes, while Rust has been stagnating?

    Is Rust too impractical of a language to use? Is Rust's community too focused on their Code of Conduct, rather than technological achievement? Is there just no reason to use a language like Rust when we have C++17, Swift and Go available to us?

    Why haven't we seen Rust succeed where contemporary languages like Swift and Go have been wildly successful?

  3. Re: Python and Swift by Anonymous Coward · · Score: 0, Funny

    Says the Rubyist who can't comprehend Swift or Python.

  4. Re: Python and Swift by Hognoxious · · Score: 1

    Comprehend Python? I can't even see it!

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  5. Why Swift over Modern C++? by Anonymous Coward · · Score: 1

    What benefit does Swift have over Modern C++ (C++14 & C++17)? Why should I choose Swift instead of Modern C++?

    1. Re:Why Swift over Modern C++? by dottrap · · Score: 5, Informative

      - Emphasizes compile time & native code much like C++
      - More powerful type system
      - Safer language by design
      - Native string type built into the language that is Unicode compliant (not a library like C++)
      - No header files
      - Large standard library (Foundation) being made cross-platform with built-in things like networking, date handling, file system abstractions, regex
      - Features to replace the runtime things that GUI programmers found useful in Obj-C/Cocoa, but doing them at compile time and with stronger type safety
      - Syntax is not constrained by C legacy compatibility
      - Will eventually have stable ABI so you can share binary libraries

    2. Re: Why Swift over Modern C++? by Entrope · · Score: 2

      "Eventually" will have a stable ABI. In the mean time, they still break the whole language about as often as C++ releases a new revision.

      Now I feel about about already having used the Apple "courage" joke today.

    3. Re:Why Swift over Modern C++? by Anonymous Coward · · Score: 0

      swift is not c++, the biggest benefit - anything would be more sane than c++ which refuses to add keywords so it overloads more and more punctuation with each release to the point it's getting silly

    4. Re:Why Swift over Modern C++? by shmlco · · Score: 1

      Ummm... you forgot optionals and closures being first-class citizens.

      As to the OP, if you want to write software for OS X / iOS / Apple TV / Apple Watch, you can't do so in C++.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    5. Re:Why Swift over Modern C++? by dottrap · · Score: 1

      I didn't forget. I just didn't think it would be interesting to the OP.

      - I didn't think optionals would be a familiar concept to a C++ programmer. They are also integrated with the type system and I already listed the type system.

      - C++ has lambda functions now. Swift has simpler syntax, but I already listed syntax.

      I am curious if you say C++ lambdas are not first-class citizens. What are examples of its limitations?

    6. Re:Why Swift over Modern C++? by jeremyp · · Score: 2

      You can write software for Apple OS's in C++. You do need a layer of Objective-C++ for the Cocoa interface though.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    7. Re:Why Swift over Modern C++? by _merlin · · Score: 3, Insightful

      C++ lambdas don't automatically extend scope of capture expressions, so you need to know what you're doing when you use them. If the lambda is going to outlive its containing invocation scope, you need to capture by copy or move. C++ gives you more low-level control over how the lambdas behave.

      C++17 adds optionals, variants and any type to the standard library. They're inspired by the corresponding types in Boost, but with a lot of the rough edges cleaned up. There's some argument to be had over language vs library, but the C++ way has always been to prefer library.

      Claiming that you can't write OSX apps in C++ is just silly - I do it all the time.

    8. Re: Why Swift over Modern C++? by Anonymous Coward · · Score: 1

      It's a new language, you don't have to use it yet. This drastic breaking is to make it a better language in the long run. Even though C++ is certainly the more practical language at the moment, you have to admit it carries some terrible historical decisions along with it.

      Assuming Swift stabilises down in a few years, maybe consider it then.

    9. Re:Why Swift over Modern C++? by Megol · · Score: 1

      I think a potential for a future stable ABI isn't worth much when they can't even release an update of the main language that is compatible with existing code.

  6. majority? by Gravis+Zero · · Score: 1

    You know, ReactOS runs the majority of the Win32 programs. So, who's ditching Win10 and heading to ReactOS?! ;)

    --
    Anons need not reply. Questions end with a question mark.
    1. Re:majority? by that+this+is+not+und · · Score: 1

      At this point in time, it's possible that ReactOS runs more Win32 programs than Windows 10.

      I certainly have a few Win32 favorites I can't run on Windows 10.

    2. Re:majority? by shmlco · · Score: 1

      There's a nice ReactiveX library for Swift. (RxSwift)

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
  7. This is why I jumped off the Apple treadmill by phantomfive · · Score: 2, Interesting

    This is why I jumped off the Apple treadmill and stopped using their proprietary languages (yeah, I know the languages are technically open, but for practical purposes the languages change at their whim). When I need to write for iPhone, the meat of the code gets written in C or C++, which is stable (and has the added benefit of being portable to Android or anywhere else).

    For the code which I write in Apple's languages, I use a simple subset of the language, trying to avoid features that are likely to be changed in the future. It makes me sad because there are some nice features, but I don't want to use them because the pain of rewriting code (for no reason) is worse than the benefit I get from those features.

    --
    "First they came for the slanderers and i said nothing."
    1. Re:This is why I jumped off the Apple treadmill by Anonymous Coward · · Score: 0

      That's a reasonable risk/reward position. It's good that the state of the art moves forward, and it's also good that stable not-moving options exist too. Of course, it's also why there are still people writing in COBOL.

    2. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 2

      That's a reasonable risk/reward position. It's good that the state of the art moves forward, and it's also good that stable not-moving options exist too.

      In general the problem is that these languages aren't moving forward. They are just churning. In some cases, the only difference is the order of parameters in a method.

      --
      "First they came for the slanderers and i said nothing."
    3. Re:This is why I jumped off the Apple treadmill by Anonymous Coward · · Score: 0

      but for practical purposes the languages change at their whim

      How much say did you have over the directions that C and C++ have taken lately? None. Your desires influence the development of C and C++ just as little as they influence the development of Swift. If anything, you probably have less of a chance of influencing C or C++ directly. Both of those languages are now heavily designed-by-committee, whereas at least Swift is developed by just Apple. There's much less social and organizational overhead to changing Swift. And don't bullshit us by saying that C and C++ retain source compatibility. C++11 altered the "export" keyword's behavior. C++17 removes support for trigraphs.

    4. Re:This is why I jumped off the Apple treadmill by Anonymous Coward · · Score: 0

      It's only churn if the changes are going back and forth. There is nothing wrong with improving an API, and while you might find parameter order to be trivial, if the changes bring consistency or clarity that is moving forward (if only with a small step).

    5. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 2

      How much say did you have over the directions that C and C++ have taken lately? None.

      It's the nature of the changes. C++ and C both have heavy commitment to backwards compatibility (your stupid examples to the contrary notwithstanding). Apple has a 3 year commitment to backwards compatibility. They change things for cosmetic reasons.

      C++11 altered the "export" keyword's behavior. C++17 removes support for trigraphs.

      ok, you convinced me. I'll use C for better compatibility.

      --
      "First they came for the slanderers and i said nothing."
    6. Re:This is why I jumped off the Apple treadmill by Anonymous Coward · · Score: 0

      For a standard set by a standards body there tends to be a consultative process with key stakeholders. In that sense it's easier to become a consulted stakeholder by being sufficiently active in the community or at a company, rather than it being a single source. Also standards bodies tend to pay attention to backwards compatibility to a good degree, although there can be some breakage (although support in compilers for older versions tends to ameliorate that).

    7. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 0

      It's only churn if the changes are going back and forth. There is nothing wrong with improving an API,

      Language design is an old, old problem. Parameter ordering consistency is also a well known, old old problem. If you can't get it right the first time, then you have no business designing a language.

      --
      "First they came for the slanderers and i said nothing."
    8. Re:This is why I jumped off the Apple treadmill by angel'o'sphere · · Score: 1

      Ah, come on phantomfive!
      You are smarter than that.
      Just because Swift 4 is out, it makes Swift 3 not dead. And as both compile down to ordinary *.o/*.lib/*.so files, they can interlink each other.
      No need to rewrite Swift 3 code to Swift 4 ... just transform old code into libs and use the new Swift for new projects.
      If the old code can't be a lib, just keep it as Swift 3 and use the old compilers for it, problem solved.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    9. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 1

      Ah, come on phantomfive! You are smarter than that.

      Thanks :)

      Just because Swift 4 is out, it makes Swift 3 not dead. And as both compile down to ordinary *.o/*.lib/*.so files, they can interlink each other.

      How long do you think Swift 3 will be maintained?

      --
      "First they came for the slanderers and i said nothing."
    10. Re:This is why I jumped off the Apple treadmill by edxwelch · · Score: 2

      That's exactly what I felt when I was doing iOS development. All my code was littered with yellow "depreciated" warnings. Trying to keep stuff "current" was an exercise in futility, because they would just depreciate a load of other stuff with the next iOS release.

    11. Re:This is why I jumped off the Apple treadmill by cerberusss · · Score: 1

      When I need to write for iPhone, the meat of the code gets written in C or C++

      Then I wonder what you write, because the meat for most apps basically is the interface. For which Apple gives you a nice framework, UIKit. Are you saying that you avoid UIKit? Not trying to be sarcastic or anything, just genuinly curious what kind of apps you build.

      --
      8 of 13 people found this answer helpful. Did you?
    12. Re:This is why I jumped off the Apple treadmill by shmlco · · Score: 1

      Got any good examples as to "order of parameters changing in a method"?

      Swift was originally tied pretty closely to the Objective-C API and headers. Swift 3 did do a host of function/parameter renaming, but on the whole they simplified the language and API quite a bit. Besides, one auto-migration and you're done.

      And if you're skipping most of the new features, then you're not using optionals, closures, enums, and other new features to your advantage. Apple has some numbers that indicate Swift reduces the number of potential crash errors in your code by about 40% over Obj-C.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    13. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      The word is deprecated, not depreciated.

      And you've got to fix those warnings, no matter who caused them. Leaving them hanging around is a recipe for things getting worse and worse, no matter what language or platform.

    14. Re:This is why I jumped off the Apple treadmill by shmlco · · Score: 2

      Actually there's a swift-evolution project where quite a few people (including non-Apple employees) are involved with Swift language design, proposals, and evolution.

      https://github.com/apple/swift...

      And as there's a Swift roadmap out there, I don't think the whole "on a whim" thing has merit either.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    15. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      Can you give an example of an Apple API that has simply changed the order of the parameters?

    16. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 0

      performSelectorOnMainThread is the one I was thinking of in particular.

      --
      "First they came for the slanderers and i said nothing."
    17. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 1

      And if you're skipping most of the new features, then you're not using optionals, closures, enums, and other new features to your advantage.

      Oh what a shame.

      --
      "First they came for the slanderers and i said nothing."
    18. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 1

      Any app that is mostly interface is a trash app: here today, forgotten tomorrow.

      --
      "First they came for the slanderers and i said nothing."
    19. Re:This is why I jumped off the Apple treadmill by Anonymous Coward · · Score: 0

      Then no one has any business designing a large language library. They all have issues and all can or should get improved over time. All of them... none is perfect.

    20. Re:This is why I jumped off the Apple treadmill by edxwelch · · Score: 1

      No they're not, but I take it you've never developed for iOS

    21. Re:This is why I jumped off the Apple treadmill by jeremyp · · Score: 1

      At some point in C it became illegal to omit int as the return type of a function. It's also no longer legal to use a function before the compiler has a prototype. Those are two examples off the top of my head.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    22. Re:This is why I jumped off the Apple treadmill by jeremyp · · Score: 1

      You can't link Swift 3 to Swift 4. They haven't nailed down the ABI yet.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    23. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 1

      So.....30 years ago is the most recent thing you can think of?
      btw, you can use a function before the prototype, and you can also omit the return type of a function. LLVM will give you a warning, but it will compile. I've also noticed that in his modern code, Donald Knuth prefers the old style function parameter declarations. Kind of weird, I didn't realize those still work, too.

      --
      "First they came for the slanderers and i said nothing."
    24. Re:This is why I jumped off the Apple treadmill by Anonymous Coward · · Score: 0

      Evidently you are comfortable releasing software that's only been compiled and not tested. In other words, in the real world "one auto-migraiton and your done" is complete and utter nonsense. Or you are working for a shitty development house that release unreliable software.

    25. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 2

      No what aren't?

      Yes, I'm an iOS developer. Have been since 2008, and a developer in general since the 1980s. Seriously, always fix your errors then your warnings before you do anything else. Anything else will bite you in the arse.

    26. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      The selector, then an object to be passed to the selector, then whether to wait to continue.

      That hasn't changed order, has it?

    27. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 1

      It was around 2012. Weirdly, I feel like we had a conversation about this very topic before, a while ago.

      --
      "First they came for the slanderers and i said nothing."
    28. Re:This is why I jumped off the Apple treadmill by Anonymous Coward · · Score: 0

      At least check your warnings to make sure they're not the type to bite your arse. Not all warnings are created equal.

    29. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      No with me I don't think.

      Swift didn't come out till 2014. And there certainly wan't any switching round of parameters in long established APIs in Obj-C.

      I'm not sure you are complaining about anything real here.

    30. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 0

      I'm not sure you are complaining about anything real here.

      I'm not sure you're not a moron. So there. Insults traded, good job.

      --
      "First they came for the slanderers and i said nothing."
    31. Re:This is why I jumped off the Apple treadmill by angel'o'sphere · · Score: 1

      Does not really matter how long it will be maintained, as long as you keep the tool suit around.
      As it is open source, and there are already alternative compilers, I would assume you have a decade or more.

      Actually I would like to do some work with Swift, too. But I have no idea about a program I could write. Except my idea of a kind of HyperCard clone :D but I guess I make that for Android first, and not iOS.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    32. Re:This is why I jumped off the Apple treadmill by angel'o'sphere · · Score: 1

      But you can recompile the Swift 3 source code with the Swift 4 compiler and get a Swift 4 compatible binary.
      https://stackoverflow.com/ques...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    33. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      So you have nothing. You were making it up. Don't be surprised when you get called out on it.

    34. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 0

      You were making it up.

      Liar.

      Are you seriously going to commit to the position that Apple maintains backwards compatibility? Because they don't.

      --
      "First they came for the slanderers and i said nothing."
    35. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 1

      You could write a decent frontend for the Stockfish chess engine. There's one available for OSX, but it isn't very good (it would be nice if it let you investigate variations without resetting the board, for example).

      --
      "First they came for the slanderers and i said nothing."
    36. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      It's not a lie. You claimed they switched around the order of parameters. I asked you for an example, and the one you mentioned wasn't true.

      Backwards compatibility: no they don't keep or pretend to keep that. But that wasn't the point in question.

    37. Re:This is why I jumped off the Apple treadmill by phantomfive · · Score: 1

      It's not a lie. You claimed they switched around the order of parameters.

      They did.

      Backwards compatibility: no they don't keep or pretend to keep that. But that wasn't the point in question.

      IT is the entire point.......why do you think this thread started?
      Languages that aren't stable have users with Stockholm Syndrome.

      --
      "First they came for the slanderers and i said nothing."
    38. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      Backwards compatibility is a good thing. But it's not the only thing. It's balanced against improving the language for the better. There's a balance to be made.

      But this isn't about why the thread started, it's about this particular comment you made: "Language design is an old, old problem. Parameter ordering consistency is also a well known, old old problem. If you can't get it right the first time, then you have no business designing a language."

      Apple hasn't been reordering their parameters, and "you have no business designing a language." Is just ridiculous. Swift is a fantastic language and gets better with each release.

    39. Re:This is why I jumped off the Apple treadmill by BasilBrush · · Score: 1

      Even then, get rid of them. Even if you have to suppress them individually after checking with a #pragma to get a clear build. Because if you get into a habit of ignoring warnings with each build, you won't notice new warnings when they appear.

  8. Re: Python and Swift by DontBeAMoran · · Score: 1

    ...there's way too much information to decode the Python. You get used to it, though. Your brain does the translating. I don't even see the code. All I see is blonde, brunette, redhead. Hey uh, you want a drink?

    --
    #DeleteFacebook
  9. Re:Swift is doing great. Go is doing great. But Ru by Anonymous Coward · · Score: 0

    Fact: Everyone on /. hates Rust and derides it at every opportunity.

  10. Re:Swift is doing great. Go is doing great. But Ru by Anonymous Coward · · Score: 0

    I wouldn't say Swift or Go are wildly successful. C and C++ are wildly successful. Python, as much as I hate it, is wildly successful. Perl was wildly successful until they tried to completely start over with the abortion known as Perl 6. PHP and Javascript are wildly successful despite both being not that great (Javascript is downright terrible).

    Swift and Go haven't even reached the market that Lua has and I wouldn't consider Lua wildly successful at all (Lua is awesome by the way). Both Swift and Go suffer from design and integration issues. I mean Go still uses statically linked binaries, the fuck!

  11. Re: Swift is doing great. Go is doing great. But R by Anonymous Coward · · Score: 1

    Because Rust is backed by a dying company.

    There are plenty of good niche languages like Elixir, but people only have so much free time. They want SDK support, they want a wealth of Stack Overflow support, they want upper management to say yes to it. This is why niche languages stay niche.

    Rust is dead unless a major player backs it.

  12. A rhetorical flourish by radarskiy · · Score: 1

    Claiming backwards compatibility is easy when your reference point was standardized 15 years after the creation of the language.

    (Note: this metric still leaves Python3 as fair game.)

    1. Re:A rhetorical flourish by phantomfive · · Score: 1

      By the time your language is released as the premier language for your platform (which Swift is) you better be sure that you got it mostly right.

      --
      "First they came for the slanderers and i said nothing."
  13. Re:Swift is doing great. Go is doing great. But Ru by K.+S.+Kyosuke · · Score: 1

    And the problem with statically linked binaries is...what exactly? Dynamic libraries served their purpose well when operating memory was expensive and compilers were simple enough. But now that RAM is cheap and compilers strive for interprocedural optimization, native dynamic libraries kind of seem to defeat the purpose of such optimizations across modules.

    --
    Ezekiel 23:20
  14. This is why I'm staying on by SuperKendall · · Score: 1

    It makes no sense to to keep a new language tied to features introduced at start, because you find slightly better ways or syntax to do what you were trying to do before - especially when you heavily factor in community feedback, as Swift does far better than almost any language I have seen (Java actually did a decent job of this earlier).

    In practice Swift has been great to use - you have a large timeframe to migrate code to newer versions (hence the backwards compatibility mode), and so far even on very large projects (100-600 Swift files) conversion has been no more than a few days at worst (Swift 3 conversion was harder than most). The converter can help quite a lot automatically migrate over a number of things, but even if you do it all manually it's just a bit tedious and does not take that long to adapt syntax.

    Swift is the first language I've seen that I think has a real shot at displacing C/C++, but that's a little while off... eventually it will reach the point of stability and mostly backwards compatibility you seek, but along the way they will have made the language as good as it possibly could be. I think it's really nice to gain a lot of experience now in a language that I think will pay off really well later, and in the meantime is something I really enjoy working in.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:This is why I'm staying on by phantomfive · · Score: 1

      Swift is the first language I've seen that I think has a real shot at displacing C/C++,

      Shake your head and wake up man, you're in the Apple bubble. Swift will never be used much on non-Apple platforms, just like Objective-C before it (which frankly, is also a much nicer language than C or C++).

      --
      "First they came for the slanderers and i said nothing."
    2. Re:This is why I'm staying on by windwalkr · · Score: 1

      ..just like Objective-C before it (which frankly, is also a much nicer language than ... C++).

      Objective-C has one or two nice syntactic tricks, but it's a very weak language compared to C++. About the only thing that it had going for it was that Apple provides a decent set of libraries- not like that isn't also available for C++, but at least Objective C had "one true standard" for such things.

    3. Re:This is why I'm staying on by K.+S.+Kyosuke · · Score: 1

      Objective-C has one or two nice syntactic tricks, but it's a very weak language compared to C++.

      Except for anything "Smalltalky" that Objective-C can do but C++ can't? I mean, I agree that Objective-C has quite a few problems, but C++ turned out to be a clusterfuck with no clear direction.

      --
      Ezekiel 23:20
    4. Re:This is why I'm staying on by phantomfive · · Score: 1

      Objective-C has runtime type binding and introspection.
      C++ has operator overloading.

      --
      "First they came for the slanderers and i said nothing."
  15. Meh. NBD by Anonymous Coward · · Score: 5, Interesting

    I have a whole bunch of apps, going back years (ObjC). I have also been programming Swift since announcements.

    I don't need no steenkin' compatibility modes; mostly because I tend to keep in my lane, and don't use too may shiny "tricks."

    It took about five minutes apiece for me to fully (and buglessly) convert all my apps. More than 40,000 lines of Swift.

    Several of the apps have already passed App Review, and are in the wild.

    However, all you Apple haters can have all the fun you want, slagging Apple. I've been hearing the same lame shit since the mid-'80s. You ain't exactly blazing a new trail, here.

    1. Re: Meh. NBD by Anonymous Coward · · Score: 0

      You are attacking an argument that nobody has even made. Jesus Christ, defensive much?

    2. Re:Meh. NBD by Anonymous Coward · · Score: 0

      Well said, same here. Apple haters are so full of it.

  16. Its only 3 years and has had 4 major releases?? by Viol8 · · Score: 1

    This doesn't exactly sound like a stable platform to develop on if they can't even manage full backwards compatibility at compile time, never mind run time. Unix C programs I wrote back in the 90s I can still compile today on modern compilers - Swift will probably just be another language footnote in 20 years time but even if it isn't, I suspect the chances of being able to compile a program written in Swift 4.0 unchanged in 2037 I suspect will be near zero.

    Seems like Apple is following MS in the rush to make changes for changes sake. "We need to do something to maintain momentum, this is something , lets do it!"

    1. Re:Its only 3 years and has had 4 major releases?? by Anonymous Coward · · Score: 0

      Comparing C your code written in the 90's is not a fair comparison. C was created in the 1970's and standardized in 1989. C had a lot of syntax changes from its inception to C89.

    2. Re:Its only 3 years and has had 4 major releases?? by Viol8 · · Score: 1

      Most compilers will still compile K&R style C without a fuss , albeit with come compile flags needing to be set.

    3. Re:Its only 3 years and has had 4 major releases?? by Anonymous Coward · · Score: 0

      And right from the original post, Swift has compile flags too.

      "Swift 4's new compatibility modes could save you from having to modify code to be able to use the new version of the compiler."

    4. Re:Its only 3 years and has had 4 major releases?? by BasilBrush · · Score: 1

      Good luck tying to keep up with a modern programmer, whilst doing all your coding in C.

    5. Re:Its only 3 years and has had 4 major releases?? by Anonymous Coward · · Score: 1

      How sad to see posts on Slashdot complaining that technology is moving too fast.

  17. All style and no substance by Anonymous Coward · · Score: 0

    the meat for most apps basically is the interface.

    That's why most apps suck.

  18. Re:Swift is doing great. Go is doing great. But Ru by 93+Escort+Wagon · · Score: 1

    I don't hate Rust. I am completely indifferent to it, though.

    --
    #DeleteChrome
  19. Nothing in the "majority" found so far... by Anonymous Coward · · Score: 0

    But we will keep looking. Soon with Apple's PR people I suppose...

  20. Embarcadero Delphi by Latent+Heat · · Score: 1

    Compiler errors, dude. Lots and lots of compiler errors.

  21. Borland Delphi 7 by Latent+Heat · · Score: 1

    Is this sort of like the whole community of Delphi Pascal users who have cut themselves of from whatever Embarcadero is selling and are still using Delphi 7?

  22. You need to look outside your own bubble by SuperKendall · · Score: 2

    Shake your head and wake up man, you're in the Apple bubble. Swift will never be used much on non-Apple platforms

    I'm afraid it is you who seem to be very much asleep.

    just like Objective-C before it

    That is why I know I'm right on this, because I fully agree with you about ObjC - I could tell that was not going to be of use outside of Apple's platforms (though I liked working in it anyway).

    But having done a wide range of programming in the past, from Java to C and C++ and Javascript and Lisp and various flavors of assembly, sometimes all server, sometimes all client, sometimes dedicated hardware... because of the broad range of past experience I have the ability to tell now when a language will be a good fit for a project. And Swift is a VERY good fit for both client and server work, and after some time, even low level work.

    Swift is not just controlled by Apple, at all - it has a thriving community driving development, and not just from Apple devs at all. It's just a really good mix of ides from many different modern languages, with a very well thought out syntax and pragmatic approach to development.

    But it's way more than that, it's one of the few languages (maybe the only one?) that really embraces what LLVM can do and takes full advantage of it...

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:You need to look outside your own bubble by phantomfive · · Score: 1

      IBM cloud is your example? Really?

      --
      "First they came for the slanderers and i said nothing."
    2. Re:You need to look outside your own bubble by cerberusss · · Score: 1

      Shake your head and wake up man, you're in the Apple bubble. Swift will never be used much on non-Apple platforms

      I'm afraid it is you who seem to be very much asleep.

      Wellll.... I very much enjoy my hacking in Swift. But I don't give it a big chance of taking off among the open source crowd. Yeah it runs on Linux, and I love it for that. But I think we'll see adoption like Mono: used here and there, but not in any major way.

      That said, Swift strikes a number of very nice balances in my opinion. I really like the expressiveness of the language, especially how easy it is to throw in some .filter {} , .map {}, and what have you.

       

      --
      8 of 13 people found this answer helpful. Did you?
  23. Both by SuperKendall · · Score: 1

    Every new version of Swift shifts some things around slightly, mostly those changes result in error messages - usually clear enough the fix is obvious right away.

    Also though, with each new release of Swift they add new compiler warnings, so usually you end up with a number of new warnings across your codebase. However these have generally been really helpful warnings, that were pointing out potential problems and really did require a fix. That has been a very useful component of each new version of Swift.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  24. Still peering inward I see by SuperKendall · · Score: 1

    It's a completely non-Apple platform; in general Swift server side development has been advancing fairly well and is not just tied to IBM.

    You truly cannot see the value of using Swift server-side, as well as on the client?

    I wonder if you even knew that Swift has been running on Linux for quite some time now...

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Still peering inward I see by phantomfive · · Score: 1

      Uh, these aren't even arguments. Objective-C has been running on Linux since the 90s. Still hasn't taken off.

      --
      "First they came for the slanderers and i said nothing."
  25. Re: Its only 3 years and has had 4 major releases? by Viol8 · · Score: 1

    I write a lot of to the metal system code including drivers. What will this âoeModern programmerâ be using? Swift? Python? Please...

  26. Re: Its only 3 years and has had 4 major releases? by Viol8 · · Score: 1

    Could is not the same as will.

  27. Re: Swift is doing great. Go is doing great. But R by tshawkins · · Score: 1

    Security, dynamic libs allow distros to deliver new versions of libs like openssl whch have security fixes, staticaly linked libs make that very hard.

  28. Re: Swift is doing great. Go is doing great. But R by Megol · · Score: 1

    It also opens up ways to decrease security (by replacing a library module). In most other ways I think statically linked code is the best choice at this point given good infrastructure support.

    But it isn't like a combination of static and dynamic linking isn't possible today, mix and match to suit the program under development. Or even ship the main code as pre-compiled code and link at installation time -> possible to replace with a new openssl library if needed. Or even better allow installation time static linking with optimization making the result as efficient as a globally optimized static linked code can be - however that's something not generally possible today.

  29. Re: Its only 3 years and has had 4 major releases? by BasilBrush · · Score: 1

    If all you are doing is writing drivers or embedded stuff, then C will serve you fine. But be clear about the fact that your preference is suitable for your niche, and most people are not in that niche.

    C is not a good general purpose programming language any more.

  30. Journey to the Center of Willful Blindness by SuperKendall · · Score: 1

    Uh, these aren't even arguments.

    They are, I'm sorry you cannot see them, but to paraphrase an old saying, you can't lead a horse to think...

    Plainly you are being obtuse, and cannot see the larger picture here. I'll let you have the last response so you can firmly cement your position in history for me to look back on and laugh ten years hence.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:Journey to the Center of Willful Blindness by phantomfive · · Score: 1

      So do you have any actual reason to think that C++ will be overtaken by Swift, or is that just your hope?

      --
      "First they came for the slanderers and i said nothing."
  31. Re: Its only 3 years and has had 4 major releases? by Anonymous Coward · · Score: 0

    > Most compilers will still compile K&R style C without a fuss

    Most is not the same as all.