Re:Conc: Better Structured Concurrency for Go
by stephen123 on Wednesday January 11, 2023 @08:12PM
(#34347707)
The main difference is that reading from channels will block if its empty where Futures, return the same value.
Written more concisely.
f := New(func() Type{return t}) v := g.Get() w := g.Get()
Re:Conc: Better Structured Concurrency for Go
by ilyt on Wednesday January 11, 2023 @08:15PM
(#34347747)
I wish Go had macros a'la Rust, it would be possible to write the whole thing in so much nicer way.
Re:Conc: Better Structured Concurrency for Go
by philosopher1234 on Thursday January 12, 2023 @01:26AM
(#34349927)
say good bye to all your nice tooling, fast compile times, uniform code bases...
Programmer write cost <<<<<<<<< read cost
Do you have any examples ? About only that I can think of is "parse something to a bunch of different types" and that can be solved easily enough. What do you mean by "reusing results" ?
> Something like go-future helps. https://github.com/stephennancekivell/go-future
that looks pretty awkward. with channels it would just be