Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The real, underlying, fundamental, philosophical problem with library and require #13

Open
piccolbo opened this issue Mar 28, 2016 · 0 comments

Comments

@piccolbo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant