←back to thread

Pitfalls of Safe Rust

(corrode.dev)
168 points pjmlp | 1 comments | | HN request time: 0.228s | source
Show context
sgt ◴[] No.43603859[source]
Golang might be better for writing robust software, if that is the goal. Robust services that don't go down.
replies(7): >>43603900 #>>43603904 #>>43604076 #>>43604231 #>>43604239 #>>43605174 #>>43605256 #
1. neillyons ◴[] No.43604231[source]
Golang will panic with a runtime error index out of range if you index out of bounds. There doesn't seem to be a nice built in way to do `arr.get(3)` like in Rust.

    slice := []int{1, 2, 3}
    i := slice[3]
    fmt.Println(i)