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

Public APIs should have argument validation and not Debug.Asserts #21

Open
gfoidl opened this issue Jul 19, 2022 · 0 comments
Open

Public APIs should have argument validation and not Debug.Asserts #21

gfoidl opened this issue Jul 19, 2022 · 0 comments

Comments

@gfoidl
Copy link

gfoidl commented Jul 19, 2022

Debug.Assert is like the name alludes only for development time. For runtime proper argument validations should be done for public APIs.

Or, as this comes with a small perf-drop, it should at least be documented that no validation is done, and it's subject to the caller of these API to provide valid arguments.

The status quo is that these APIs are really unsafe 😉 not just in some implementations, but from an API's point of view.

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