I don’t think it’s cheating. It’s taking advantage of the environment’s capabilities. Due to their threaded nature, languages like Python and JavaScript have to have dedicated language constructs for generators.
Joe Armstrong demonstrates building a Future with concurrency features, so if you need a generator - go ahead, use a process (even a GenServer) to build one. I still need to completely digest “To spawn, or not to spawn?” but I’m not advocating going on a spawn-fest; just sometimes it is good to leave the “sequential mindset” behind.


















