←back to thread

1371 points yett | 1 comments | | HN request time: 0.207s | source
Show context
pmarreck ◴[] No.43774498[source]
My takeaway, speaking as someone who leans towards functional programming and immutability, is "this is yet another example of a mutability problem that could never happen in a functional context"

(so, for example, this bug would have never been created by Rust unless it was deeply misused)

replies(8): >>43774636 #>>43774657 #>>43774734 #>>43774921 #>>43775019 #>>43775231 #>>43775948 #>>43780177 #
gavinray ◴[] No.43774657[source]
Rust protects you from external file data you read being incorrect?

That's one hell of a language!

replies(5): >>43774989 #>>43775029 #>>43775151 #>>43775196 #>>43781366 #
1. mbel ◴[] No.43775029[source]
Most popular languages would prevent this. In this case it’s as simple as having more sensible reader API than sscanf in standard library and forcing variables to be initialized.