Big things missing from Swift IMO: - Higher-kinded types - Strictly-typed "throw" I'm not sure about dropping "Type" from protocols because it's pretty commonly used to separate the protocol definition (which is extended to provide most of the implementation) from the concrete base implementation, e.g. RAC's SignalProducerType/SignalProducer.
Swift Evolution acceptances: The big three
31–37 of 37 posts
Re: Swift Evolution acceptances: The big three
#32Earlier quoted context omitted.
For that to happen, they need to have the compiler target more than just OS X, iOS and GNU/Linux.
There are some porting efforts underway in the early stages of development. SwiftAndroid: https://github.com/SwiftAndroid Swift for Cygwin: https://github.com/tinysun212/swift-cygwin-bin
I see Swift more as a way to bring FP concepts to the masses via the desire to target iOS/AppStore.
Personally I am already sold to other ML influenced languages.
Re: Swift Evolution acceptances: The big three
#33Earlier quoted context omitted.
There are some porting efforts underway in the early stages of development. SwiftAndroid: https://github.com/SwiftAndroid Swift for Cygwin: https://github.com/tinysun212/swift-cygwin-bin
I am curious to see if Microsoft is going to support it in their iOS bridge for Windows. I see Swift more as a way to bring FP concepts to the masses via the desire to target iOS/AppStore. Personally I am already sold to other ML influenced languages.
Don't see it on their roadmap: https://github.com/Microsoft/WinObjC/wiki/Roadmap
But there's an open issue for it so that's promising: https://github.com/Microsoft/WinObjC/issues/25
Re: Swift Evolution acceptances: The big three
#34Big things missing from Swift IMO: - Higher-kinded types - Strictly-typed "throw" I'm not sure about dropping "Type" from protocols because it's pretty commonly used to separate the protocol definition (which is extended to provide most of the implementation) from the concrete base implementation, e.g. RAC's SignalProducerType/SignalProducer.
Would you have an example for someone who doesn’t know anything about higher-kinded types?
T?.flatMap(T -> R?) -> R?
[T].flatMap(T -> [R]) -> [R]
However, you cannot write a protocol for "things that can be flatMapped", because you cannot refer to a Self specialized with a different type (Self). With HKTs, you can do that, which would let you write something like this: protocol FlatMappable
{
typealias Value
func flatMap(Value -> Self) -> Self
}
That's not useful on its own, but it means that you can now write functions and extensions that reason about the general concept of anything FlatMappable (this is most of the way to what is known as monads, FWIW).Re: Swift Evolution acceptances: The big three
#35Earlier quoted context omitted.
What's the alternative? The blog (according to the HTML source) is pretty stock WordPress, which is database-backed.
Just a regular github.io page, or if you wanna be a bit more fancy https://hugotunius.se/2016/01/10/the-one-cent-blog.html .
Re: Swift Evolution acceptances: The big three
#36Earlier quoted context omitted.
Databases are fine, but blogs change infrequently and mostly serve the same static content. Caching the database-generated pages, or just serving static files, if much more efficient, especially when a crowd comes.
Can better blogs be built on top of Google's App Engine? I've been building on top of it with Go but I don't use app engine's data store, and I'm not sure that I want to. My little database is a pregenerated Go variable. http://www.h4labs.com/dev/ios/swift.html I'd like to add more features but I don't want to reinvent everything. Anyway, Go and App Engine handle the load well and so far it has been free.
You will likely run out of the free tier and into significant spending during the spike pretty soon.
If you ran a highly interactive page that required a lot of non-trivial server-side processing, I'd understand.
But blogs serve the same static content to almost every request. I don't see why burning a whole lot of CPU and IO on it by running python/php/ruby and hitting a database many times is worth it. Serving a set of static files automatically generated by a blog engine (like Jekyll) seems much more reasonable to me.
Regarding comments: Disqus or something like that could help. Or you could turn the comments off during a spike: seeing the content without comments is a much better user experience than seeing a 500 Server Error page.
Re: Swift Evolution acceptances: The big three
#37Earlier quoted context omitted.
Just a regular github.io page, or if you wanna be a bit more fancy https://hugotunius.se/2016/01/10/the-one-cent-blog.html .
There's a pretty massive difference in the amount of effort needed to publish a post with either of those approaches vs. just typing it into the WYSIWYG editor on WordPress. If your time is worth $60/hour then you're looking at around ~$10/ post in additional time spent. You also lose a bunch of features: comments, trackbacks, RSS, etc.