3 ms·
Anyone know why they went with this rather than do-notation so that we can implement our own async etc?
by pharmakom 5y ago
Anyone know why they went with this rather than do-notation so that we can implement our own async etc?
- Skinney 5y agoDo notation would only benefit Java, not all the other languages on the JVM. Do-notation would also not solve the problem outlined in the "What color is my function" article. By doing it this way, the entire JVM ecosystem get's the benefits of async/await without changing the Java language. It's also easier for developers to learn (do what you're used to with threads, just use this .virtualThreadPool function instead and be extravagant with the number of threads in the pool).