News for hackers. Stuff that matters.
Re:Simpler UI Logic With Finite State Machines by jwr on Monday December 23, 2019 @07:25AM (#21863192)
I am not convinced that explicit state machines are a good way to write code. Using core.async you get an implicit state machine, while preserving the illusion of sequential code, which is much simpler from the developer point of view.
Re:Simpler UI Logic With Finite State Machines by AstralStorm on Monday December 23, 2019 @09:06AM (#21863640)
As long as you don't want to interact from said "sequential" code with the world. Then you get to deal with all the fun of asynchronous programming. Including but not limited to race conditions, data corruption and so on.
Re:Simpler UI Logic With Finite State Machines by sansnomme on Monday December 23, 2019 @01:46PM (#21866001)
Core.async supports Go-style channels so you are trading off speed (it has a runtime) for concurrency-correctness. It's a good fit for network requests since the bottleneck is elsewhere.
Re:Simpler UI Logic With Finite State Machines by jwr on Monday December 23, 2019 @11:16AM (#21864611)
I'm not sure what you mean? Much of my core.async code deals with things like network requests.