3 ms·
Which languages see exception handlers work across go routines? Anyway, most don't. There is no difference from exception handlers in most other languages. Th
by randomdata 2y ago
Which languages see exception handlers work across go routines?
Anyway, most don't. There is no difference from exception handlers in most other languages.
The syntax is a little different. Is that where you've become confused?
- rerdavies 2y agoLanguages in which try/catch/throw work across coroutine boundaries: Java, Javascript, and it's a standard feature in C++ coroutine libraries (and completely supported by the core C++ coroutine engine). So in my limited personal experience, among the languages that I am familiar with ... all of them except go. Are there actually ANY languages other than go that have coroutines, and try/catch/throw mechanisms, where you cannot throw across a coroutine boundary? And why would exception handlers NOT work across coroutine boundaries, other than laziness on the part of implementers?
- randomdata 2y ago> Languages in which try/catch/throw work across coroutine boundaries You wha...? The question was about goroutines, not coroutines. Besides, you'll notice that exception handlers cross coroutine boundaries in Go just fine. Your random tangent isn't even correct. Where did you dream up this idea to the contrary? I know coroutines are still new to Go, only officially landing in the latest release (experimentally in 1.22), but you'd think that would also mean their behaviour is fresh in your memory. I'll take your avoidance of the original question to mean that no other language does it either.
- rerdavies 2y agoI answered as I did because the original question seems strangely broken. The premise upon which the question is asked is flawed. What are goroutines, other than peculiarly broken coroutines? (Notwithstanding your point that go has a non-broken implementation of coroutines at experimental release stage). It is true that Javascript has a goroutine-like facility for executing coroutines on a seperate thread. But there are languages (c++, c# at least) where coroutines can execute on separate threads without suffering from the broken-ness of goroutines.