This is a constant discussion in Helsinki, too. I think it's better to build expensive if that translates to good locations and high quality.
519 karma · joined October 15, 2013
This is a constant discussion in Helsinki, too. I think it's better to build expensive if that translates to good locations and high quality.
I wonder if it's any better on iOS or are you just completely out of luck there when you can't reconfigure the shortcuts?
It still feels a bit pointless, but what do I know.
1. Value types
2. Tuples
3. Key paths
4. Checked exceptions (could be more powerful in Swift, but they are there, and when not used in excess they are actually pretty nice, and Swift's `try` syntax is excellent)
5. Swift's enums and `switch` feel both more straightforward and more powerful than Kotlin's sealed classes and `when` (I'm not sure about this, but I think there are situations where you get better coverage checking with Swift's pattern matching.)
6. Reified generics (I know that opinions on this vary, and it doesn't often matter, but I've been just writing some code where it's been nice to be slightly more type safe with Any values)
7. More principled null handling (Optional is just an enum, although with some extra syntactic support)
8. `if let`, `if case`, `guard let` and `guard case` allow for simpler handling of multiple values than Kotlin's `?.let` and null checks
I like Kotlin being more expression oriented, but in the end I often find my Swift code to be less contorted due to the more powerful conditional constructs. GC vs ARC isn't much of an issue, both work for me.
So yeah, Paris is dense, but if you compare block by block the differences are smaller.
let foo: Int
if x <= 0 {
foo = 0
} else if somethingElse > 50 {
foo = 9000
} else {
foo = 42
}
That way you get immutable foo and the compiler will shout at you if you forget to assign the value in one branch. It's not quite as nice as an expression, but it's less punctuation than the closure and the result is just as safe.One reason I haven't seen mentioned here for that personal content: it's also a question of building context and trust. If I go to Bon Appetit for a recipe, I know they've tested it a few times and it should be more or less OK even if I don't recognize the author. If I go to a barebones anonymous just-the-recipes site, I have no faith that it ever worked and if it did, it wasn't just a fluke and it was written down right.
Having some detail around a recipe from a previously unknown source allows me to build a connection to a persona in my head, genuine or otherwise. If a recipe doesn't work I'll know to avoid the site in the future. If it does work I can remember that connection and come back to the site again with some more confidence.
If I'm ever involved in designing a syntax like that, the first hard and fast rule will be that the user should never have to count anything, especially in relation to anything else.
Saleem Abdulrasool, who has been working on Swift on Windows, was also recently added to the core team.
So I don't know if it's actually on the roadmap, if one exists, but official support doesn't seem impossible.
As for more money and time… I dunno, I make my living writing mostly iOS and Mac software and I can't recall the last time I did anything that was architecture specific. I'd imagine that applies to the vast majority of people working on ordinary application software on these platforms.