You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is function proliferation for arbitrary reasons. library and require pretty much do the same thing. If one exists the other shouldn't. Alternatively, we could have for any function that can fail two versions, one that throws an exception and the other that returns false. Even if you limit this to functions that don't need to return anything else --- say that excludes sum or sqrt, it's a lot of functions. The correct solution is that if you don't want a function that can fail to take down the whole program you can wrap it in a tryCatch call or equivalent. That's the correct solution because 1) You don't need to duplicate so many functions 2) You get exactly the same flexibility. For additional discussion of function proliferation and cavalier choice of return values and names, see also A critical look at the anyNA function.
The text was updated successfully, but these errors were encountered:
The problem is function proliferation for arbitrary reasons.
library
andrequire
pretty much do the same thing. If one exists the other shouldn't. Alternatively, we could have for any function that can fail two versions, one that throws an exception and the other that returns false. Even if you limit this to functions that don't need to return anything else --- say that excludessum
orsqrt
, it's a lot of functions. The correct solution is that if you don't want a function that can fail to take down the whole program you can wrap it in atryCatch
call or equivalent. That's the correct solution because 1) You don't need to duplicate so many functions 2) You get exactly the same flexibility. For additional discussion of function proliferation and cavalier choice of return values and names, see also A critical look at the anyNA function.The text was updated successfully, but these errors were encountered: