←back to thread

261 points rbanffy | 3 comments | | HN request time: 0.001s | source
Show context
AlexanderDhoore ◴[] No.44003888[source]
Am I the only one who sort of fears the day when Python loses the GIL? I don't think Python developers know what they’re asking for. I don't really trust complex multithreaded code in any language. Python, with its dynamic nature, I trust least of all.
replies(19): >>44003924 #>>44003936 #>>44003940 #>>44003943 #>>44003945 #>>44003958 #>>44003971 #>>44004203 #>>44004251 #>>44004431 #>>44004501 #>>44005012 #>>44005100 #>>44005259 #>>44005773 #>>44006165 #>>44007388 #>>44011009 #>>44011917 #
txdv ◴[] No.44003940[source]
how does the the language being dynamic negatively affect the complexity of multithreading?
replies(4): >>44003967 #>>44005360 #>>44005981 #>>44006794 #
1. breadwinner ◴[] No.44005360[source]
When the language is dynamic there is less rigor. Statically checked code is more likely to be correct. When you add threads to "fast and loose" code things get really bad.
replies(1): >>44005849 #
2. jaoane ◴[] No.44005849[source]
Unless your claim is that the same error can happen more times per minute because threading can execute more code in the same timespan, this makes no sense.
replies(1): >>44007326 #
3. breadwinner ◴[] No.44007326[source]
Some statically checked languages and tools can catch potential data races at compile time. Example: Rust's ownership and borrowing system enforces thread safety at compile time. Statically typed functional languages like Haskell or OCaml encourage immutability, which reduces shared mutable state — a common source of concurrency bugs. Statically typed code can enforce usage of thread-safe constructs via types (e.g., Sync/Send in Rust or ConcurrentHashMap in Java).