←back to thread

517 points bkolobara | 2 comments | | HN request time: 0s | source
Show context
BinaryIgor ◴[] No.45042483[source]
Don't most of the benefits just come down to using a statically typed and thus compiled language? Be it Java, Go or C++; TypeScript is trickier, because it compiles to JavaScript and inherits some issues, but it's still fine.

I know that Rust provides some additional compile-time checks because of its stricter type system, but it doesn't come for free - it's harder to learn and arguably to read

replies(17): >>45042692 #>>45043045 #>>45043105 #>>45043148 #>>45043241 #>>45043589 #>>45044559 #>>45045202 #>>45045331 #>>45046496 #>>45047159 #>>45047203 #>>45047415 #>>45048640 #>>45048825 #>>45049254 #>>45050991 #
ViewTrick1002 ◴[] No.45042692[source]
Neither Go, Java or C++ would catch that concurrency bug.
replies(2): >>45043212 #>>45050050 #
1. lenkite ◴[] No.45050050[source]
> Neither Go, Java or C++ would catch that concurrency bug.

That is incorrect. Java enforces that a monitor lock (or Lock) must be released by the same thread that acquired it. Attempting to unlock from a different thread throws IllegalMonitorStateException.

replies(1): >>45051022 #
2. rapsey ◴[] No.45051022[source]
At runtime instead of compile time, which is the point of the thread.