by andai · 2y ago · 0 comments
It seems like Yao's whole project is solving the concurrency problem.
I'm like, why not drop it entirely (if performance isn't one of the language's top priorities anyway)? What does keeping it gain that's so important? (Context: I don't understand concurrency and multithreading.)
Yao's concurrency will be explicit. You will not get concurrency unless you open a threadset and spawn threads. Yao scripts run in a single thread by default.
I focused on solving the concurrency problem because if it is solved, single thread code is solved as well.
Famous last words. Ever needed a timeout? Cancelation? Respond to Ctrl+C (SIGINT)? Your UI has an event handler? Client server architectures? All of those things need concurrency, somewhere.
That said, you could argue that I’m being nitpicky. A combination of the OS and language runtime (eg JavaScript) can keep you mostly isolated from the complexity explosion of parallelism and concurrency. But it’s still there.
Could you elaborate on that? In your case you don't need to worry about Send/Sync, you can use Cell/RefCell, etc. The borrow checker isn't about threading, it's useful in a purely single-threaded context too.
I get not needing it, but if you don't understand concurrency or multithreading how are you so certain you don't need concurrency or multithreading?