from Hacker News

WWDC 2018 What's New in Swift Recap

by jtbrown on 6/8/18, 1:15 PM with 44 comments

  • by dep_b on 6/8/18, 1:49 PM

    Yessssss for the allCases property for enums!!!

    Enums are really the best feature of Swift. I enum all the things everywhere. This is kind of the finishing touch to it.

    Binary stability would be nice. I do care about the download sizes of my apps. What's really missing from the language is a way to add custom tags like @discardableResult @objc to define some kind of property. It's such a kludge to set up things like ViewModels while I really would like to have something like:

        @twoWayBinding[username]
        lazy var username: UILabel = { /* etc */ }()
  • by jmull on 6/8/18, 2:41 PM

    > Swift 5 (Early 2019): > binary compatibility with future Swift releases

    I bet this doesn't really happen, though it probably makes the day when it really happens closer.

    (I don't just mean they might miss the date, but that (1) they miss the date by a lot; and/or (2) they drop binary compatibility from Swift 5; and/or (3) they claim they've achieved binary compatibility but it doesn't out to be true for long, less than 5 years )

  • by selljamhere on 6/8/18, 3:20 PM

    >>New hashing algorithm

    >>Hash values vary from run to run (so don’t depend on hash values or order)

    I must be reading this wrong. One of the requirements for a good hash function is determinism - specifically that any given value in the input space maps to exactly one value in the output space.

  • by asd on 6/8/18, 1:48 PM

    Nice set of highlights. It's amazing to see how quickly Swift has evolved in four years.
  • by marvel_boy on 6/8/18, 1:48 PM

    "Faster builds"

    How compares with Objective-C compile times?

  • by swyx on 6/8/18, 1:30 PM

    has swift made the leap to server side yet? i keep hearing mumblings about that.
  • by ssvss on 6/8/18, 3:11 PM

    Is there a plan for c++ Interop in swift. Or have they decided that using the obj-c bridging layer is enough.
  • by st3fan on 6/9/18, 12:42 AM

    I hear Firefox compiles twice as fast with the new compiler.
  • by masonicb00m on 6/8/18, 5:30 PM

    What was bad about arc4random?