[swift-evolution] [Concurrency] Reactive streams as building blocks for actors etc.

Georgios Moschovitis george.moschovitis at icloud.com
Sun Sep 3 02:36:24 CDT 2017


That would be definitely a great addition to the language. IMO, Dart gets this right:

https://www.dartlang.org/tutorials/language/futures <https://www.dartlang.org/tutorials/language/futures>
https://www.dartlang.org/tutorials/language/streams <https://www.dartlang.org/tutorials/language/streams>

In general, I would prefer an async story like this:

- support coroutines / generators (yield)
- use coroutines to implement Future and Stream/Observable
- optionally provide async/await as syntax sugar for Future/Stream (or just reuse yield)

-g.

> On 29 Aug 2017, at 4:56 AM, Howard Lovatt via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Many of the currently popular server side frameworks are switching to Reactive Streams:
> 
>     http://en.wikipedia.org/wiki/Reactive_Streams#Adoption <http://en.wikipedia.org/wiki/Reactive_Streams#Adoption>
> 
> for their underlying communication, including Akka. Reactive Streams are also to become builtin to Java, as the Flow class, in version 9.
> 
> Would it be wise if Swift 5 also builtin Reactive Stream protocols and built its Actor implementation etc. on top of this protocol?
> 
>   -- Howard.
> 
> More info on Reactive streams:
> 
>     https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.1/README.md#specification <https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.1/README.md#specification>
> 
>     http://bryangilbert.com/post/code/scala/akka-reactive-streams/ <http://bryangilbert.com/post/code/scala/akka-reactive-streams/>
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170903/16d5d6d4/attachment.html>


More information about the swift-evolution mailing list