I guess it is for performance purpose.
If you care about getting the same error, use force
. If you don't but want better performance, use force_val
.
As you can see here, force
does the same thing as force_val
but performs an extra access to memory in case an exception occurs.
After reading the source and running some tests, the behaviour of these two functions seems different from what the doc says : If you use only force
, you will always get the original error but if you use force_val
the first call will raise the original exception and all subsequent calls to force_val
or force
will raise Undefined
.
EDIT: Actually, I'm not sure that using force_val
instead of force
improves performance since force
is a primitive and force_val
is not.