Code Monkey home page Code Monkey logo

Comments (3)

z33ky avatar z33ky commented on June 28, 2024

I forgot, for main() we can also change from a enum class for error_code to a plain enum, though we'd loose the mandatory scoping. There are workarounds to make something that looks like a scoped enum though, with namespaces or inconstructible classes.

from sh3redux.

Quaker762 avatar Quaker762 commented on June 28, 2024

I think it makes sense to just static_cast.

I like this as well. As good as having an sh_main function would be, that would probably just confuse anyone else looking to join, as they'd have to go 'function hunting'

For die() we should perhaps stick a @warn in the documentation that destructors will not be run on objects on the stack. We can also replace assert() with a custom variant, which also tries to log the assertion, and perhaps supports stuff like continuing anyways, for purpose of debugging.

I agree. For the most part though, die doesn't necessarily need to run destructors for stack objects, as the shit has already hit the fan. As for the custom assert(), I feel later in development this will make debugging a LOT easier.

from sh3redux.

z33ky avatar z33ky commented on June 28, 2024

As for the custom assert(), I feel later in development this will make debugging a LOT easier.

I'm working on it. I'll open a pull request after I got some sleep and cleaned it up.
This issue is done though.

from sh3redux.

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.