unfortunately, ElegantBeef's reply did not really convince me.

it's good to know the use of `-d:danger` and `--checks:off` with this scenario.

i tried compile a snippet with `--checks:off`, the output surprised me: 
`deque.popLast()` always returns `0`; does that make sense? there is no 
document describes this behavior.
    
    
    proc test_deque =
      var x = [1].toDeque
      
      echo "1: ", x.popLast
      try:
        echo "2: ", x.popLast
        echo "3: ", x.popLast
        echo "4: ", x.popLast
      except IndexError:
        echo "catched IndexError"
    
    
    when isMainModule:
      test_deque()
    
    
    Run

in the end, i think that behavior is a good reason to keep away from `EAFP` in 
nim.

Reply via email to