GithubHelp home page GithubHelp logo

Comments (2)

a4z avatar a4z commented on June 26, 2024 1

After skimming again though our assert usages, I am closing that issue.

Asserts have a defined use case in C++, that is, check a condition in debug build and don't check (remove that code) in release builds.
There are many asserts, and they are used in the spirit of that use case.

If there is any special assert that should be implemented as a runtime exception also in release builds, there should be specific ticket for it, so it can be discussed. And if there is an exception implementation, tests need be added to trigger that problem and verify exceptions are thrown accordingly.

A general ticket like this, that wants to remove all asserts, can not be implemented, since asserts have a real use case.

from djinni-support-lib.

a4z avatar a4z commented on June 26, 2024

I agree that there is no safety , except a check in a debug build (with an assert failure).

But I have difficult to see what else to do.
Exceptions, just crash .... ? This might result in the same , because, how could you handle such an exception.
And then there is of course the question of the likeliness of such an event, and if we are willy to pay the price of additional code in the release build for this scenario?

It would be good to find answers to those questions to come up with a strategy for a better solution, if there is any

from djinni-support-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.