To me, the most interesting empirical result of the Swift language evolution so far is the lack of urgency on language-level concurrency. If they think they can be competitive for years (at the very least vs. Objective-C) with only platform-level concurrency support, it makes me wonder whether concurrency is generally better provided by the platform instead of the language for most needs. Conventional wisdom would ha…
Swift Programming Language Evolution
141–150 of 181 posts
Re: Swift Programming Language Evolution
#142Re: Swift Programming Language Evolution
#143Earlier quoted context omitted.
Sorry was generalizing. I meant generics and protocols in combination. The ability to define a protocol based on a generic would be fantastic. It's something that is solved in Haskell fairly well.
Isn't that somewhat possible with extensions and constraints? At least that was the impression given by last year's WWDC talk [1], unless you're thinking of something else? [1]: https://developer.apple.com/videos/play/wwdc2015/408/
Re: Swift Programming Language Evolution
#144Don't compare objective-c to c/c++. Objective-c is a different level of retard.
https://news.ycombinator.com/newsguidelines.html
https://news.ycombinator.com/newswelcome.html
We detached this subthread from https://news.ycombinator.com/item?id=11660700 and marked it off-topic.
Re: Swift Programming Language Evolution
#145While the language is nice, I find it hard to work with existing frameworks, given they are designed for a language as dynamic as objective-c. For example, NSError, NSNotification's userInfo is a `[AnyObject:AnyObject]`, but its member types are specified in documentation. It would be nice if we can have specific error will typed userInfo. Working with storyboard is the same story, there is no type check for VC and s…
Re: Swift Programming Language Evolution
#146So Swift has been out awhile, what do people think of it? What other language would you compare it to (e.g. C#, C, C++, etc)? What about the libraries are they well laid out?
My favorite thing about Swift is that is seems to get out of the way - and when it gets in the way it's usually with a nifty language feature (like the { $0 + $1 } closure syntax). I'm very excited for the future - between Go and Swift we now have two compiled fast languages that are almost as expressive as their slower dynamic/interpreted cousins. As an aside, I like that Apple is betting the farm on ARC. I wish I c…
Re: Swift Programming Language Evolution
#147To me, the most interesting empirical result of the Swift language evolution so far is the lack of urgency on language-level concurrency. If they think they can be competitive for years (at the very least vs. Objective-C) with only platform-level concurrency support, it makes me wonder whether concurrency is generally better provided by the platform instead of the language for most needs. Conventional wisdom would ha…
Specifically:
* Support for annotations; the compiler/runtime can be informed about safety and marshaling concerns. * Anonymous function bodies. You can implement Go's "go func() { ... }()" pattern yourself, and a concurrency runtime can implement it. Rust uses the exact same pattern. * Generic iterators/streams. No need for channels as language primitive since you can write a generic channel implementation.
Go is nice, but its language-level concurrency is very much a side-effect of its intentionally impoverished type system. For example, the built-in "chan" type exists because otherwise a generic channel implementation would have to use interface{}, which is not type-safe and would be hell to work with.
Here's what's lining up to become Swift 4.0's concurrency support (all the concurrency models!): https://github.com/apple/swift/blob/master/docs/proposals/Co....
Re: Swift Programming Language Evolution
#148Re: Swift Programming Language Evolution
#149Earlier quoted context omitted.
I'm a big fan. I love the statically inferred type system, generics, & optionals. Also really like a lot of the functional programming concepts + value types but still enjoy being able to fall back on OOP. It feels like the best of both worlds. I can't wait till we have language native concurrency techniques, so I can start writing swift in backend code.
I was disappointed to see that concurrency support won't be in Swift 3.0.
Re: Swift Programming Language Evolution
#150The removal of prefix and postfix ++ and -- operators and the removal of C-style for loops are mistakes, IMO.
> prefix and postfix ++ and -- operators IMHO, these operators are the worst features of C. Particularly I never understand the necessity of both i++ and ++i operators in language at the same time.
I don't mind removing them but their usecase is obvious: make the code more concise and more readable (and yes, if you program in C on daily basis you don't require a double take or thinking about what ++ does).