Code Monkey home page Code Monkey logo

Comments (3)

michaelkourlas avatar michaelkourlas commented on May 27, 2024 1

I'll be submitting a PR shortly!

from minijson_reader.

giacomodrago avatar giacomodrago commented on May 27, 2024 1

Hey @michaelkourlas, I went on a refactoring spree and reworked the value class entirely, on the rework_number_parsing branch.

These *_representation_available() functions are no longer a thing (and I wouldn't know how to neatly bring them back) because those representations are created lazily by calling value.as<T>() with T being an arithmetic type. std::range_error is thrown if the number does not fit in T.

from minijson_reader.

giacomodrago avatar giacomodrago commented on May 27, 2024

This library really isn't great, and if I were to rewrite it now from scratch it would look very different (but there are probably better alternatives around anyway, even respecting the same constraints e.g. no heap memory allocations).

#4 has been around for years, and I haven't had time to properly think about the problem of making number parsing less rubbish, nor did anyone come up in the meantime with a good solution ready for me to implement (or to just merge).

Given the context, I agree with your idea of adding those two bools to at least solve this particular issue. The fastest way for you to have it done is, well, to issue a pull request. If you keep it single-topic, add the tests and the documentation, and make it easy to review, I'll merge it straightaway.

from minijson_reader.

Related Issues (14)

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.