Skip to content

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

@gfoidl

Description

@gfoidl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions