Giter Site home page Giter Site logo

About exceptions handling about glaze HOT 4 CLOSED

stephenberry avatar stephenberry commented on May 18, 2024
About exceptions handling

from glaze.

Comments (4)

stephenberry avatar stephenberry commented on May 18, 2024 1

@Bolderaysky The no_except branch (#156) has been merged, so you can now build with -fno-exceptions

from glaze.

stephenberry avatar stephenberry commented on May 18, 2024

Yeah, we currently don't have a no exception option for JSON. Binary reading/writing doesn't throw errors, as it expects proper data generated from the library.

We plan to implement a no exception compile time option for JSON, but there is actually a performance loss when going to another error handling approach (exceptions allow us to reduce the number of branch checks). We also want to make sure we're not over complicating the code base and have a good implementation. But, I have an idea I'll experiment with.

Do you have a target platform that doesn't allow exceptions?

Thanks for bringing this up and hopefully it will be tackled soon.

from glaze.

Bolderaysky avatar Bolderaysky commented on May 18, 2024

Thanks for your answer!

Mainly, these platforms are Linux and macOS, where I disable exceptions and do everything explicitly.

It is possible to work around that by compiling a part of the project that uses Glaze as a shared library and only use exceptions in that library. However, it would be great to see such an opportunity in Glaze, since there are platforms where the use of exceptions is not allowed at all.

from glaze.

stephenberry avatar stephenberry commented on May 18, 2024

Yeah, we want to be able to build on embedded hardware in the future, so disabling exceptions is required. Thanks for the encouragement to work on this.

from glaze.

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.