4 ms·
Depends on what you mean by async programming. If you literally mean async and await as available in Haskell, Rust, C#, JS, Python etc. Then no that's definitel
by rowanG077 4y ago
Depends on what you mean by async programming. If you literally mean async and await as available in Haskell, Rust, C#, JS, Python etc. Then no that's definitely not the same thing as windows 3.1's cooperative multitasking.
- amelius 4y agoThe async and await is just syntactic sugar that makes you more addicted to it.
- rowanG077 4y agoThe syntactic sugar is the entire point. If you don't have it it just sucks as a technology.
- wruza 4y agoSometimes green threads require no syntactic featutes at all, e.g. Lua coroutines. You yield() through the stack and resume() back when “done”. local data = readfile("file1”) writefile("file2", data) The above example may have async/await-ed two times without any sugar. I believe that’s exactly what coop-mt code would look like (but at the lower level, because of hw stack instead of heap-based), Tbf I never did that in windows 3.x, do I miss something?
- UncleMeat 4y agoAnd structured programming is just sugar over GOTOs. Polymorphism is just sugar over type inspection and branching. Recursion-free function calls are just sugar over variable renaming and text movement.
- amelius 4y agoCorrect, but that misses the point, which is that async programming is NOT sugar over the more powerful approach of preemptive multitasking (introduced in Windows sometime after version 3.1).
- wruza 4y agoAssuming that we know how promises and syscall-triggered context switches work, what’s the important difference?
- deleted 4y ago[deleted]
- pmontra 4y agoIt's the Visual Basic event loop from the Windows 3.1 / 95 times. One thread doing all the job with callbacks for events. Events were almost only UI events back then.