Live data from Hacker News

WWDC 2018 What's New in Swift Recap

roadfiresoftware.com

1–10 of 45 posts

Re: WWDC 2018 What's New in Swift Recap

#6
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 */ }()

Re: WWDC 2018 What's New in Swift Recap

#7

"Faster builds" How compares with Objective-C compile times?

Still not as fast and probably Objective-C got a speed boost as well. Objective-C is a very simple language and types are quite explicit. In Swift you have implied types like:

   let result = jsonList.map { Class(from: $0) }.filter { $0.isSelected }.map { T(from: $0 }
Or worse:

   let myDict = ["key": 1, "key2": 0.2, "key3": "something"]
It has to figure out it's not an int, not a number but an Any dict. Complexity to figure out the real type can quickly ramp up.

Re: WWDC 2018 What's New in Swift Recap

#8
post #7

"Faster builds" How compares with Objective-C compile times?

Still not as fast and probably Objective-C got a speed boost as well. Objective-C is a very simple language and types are quite explicit. In Swift you have implied types like: let result = jsonList.map { Class(from: $0) }.filter { $0.isSelected }.map { T(from: $0 } Or worse: let myDict = ["key": 1, "key2": 0.2, "key3": "something"] It has to figure out it's not an int, not a number but an Any dict. Complexity to figu…

Type inference, at least for variables doesn't really take that much time. In practice almost every language does it, they just don't expose it to the developer. For example you can do this in C:

    foo->bar()->baz()
And the compiler has to get the type for the bar() result. That's one a small step from:

    let x = foo->bar()
Also that dictionary is most likely parsed and assigned a type in the expression whether you specify the variable type or not.

Re: WWDC 2018 What's New in Swift Recap

#9
post #3
post #2

has swift made the leap to server side yet? i keep hearing mumblings about that.

Vapor apparently gets favorable reviews by those who drank the Kool-Aid: https://vapor.codes/ Never tried it though. I don't select stacks primarily based on programming language.

I’ve used it for a few sites at this point. Haven’t used v3 but it’s been a great resource. It’s a cool experience coding a website with a compiled language, especially swift.

Re: WWDC 2018 What's New in Swift Recap

#10
> 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 )

Post reply on HN