Re:Golang’s most important feature is invisible
by Yoric on Tuesday January 25, 2022 @02:32AM
(#30069184)
My team just spent three weeks hunting down a race condition in JavaScript integration tests. Turns out it was a missing `await`. So, I wouldn't claim that JavaScript is anywhere near safe :)
Admittedly, this was back-end, so it's possible that the situation is simpler in the front-end.
Good luck with your project!
The javascript threading model is that there is a single thread executing so within a given bit of code you can be reasonably sure things are safe. The hyperscript runtime only allows one instance of a given event handler to execute at a time (unless otherwise specified) so the primary source of concurrency issues (the same code executing concurrently) is typically not an issue. By structuring your code such that it is on the same element (perhaps triggered by events elsewhere) you can effectively synchronize code in an intuitive manner.
I certainly wouldn't recommend the language for the back end though!