Giter Club home page Giter Club logo

Comments (3)

M123-dev avatar M123-dev commented on June 18, 2024

I understand your thoughts, if the api specifies it as unknown, it would be logical to write it in the enums as well, but does it make such a big difference that it is worth changing it?

Or do you mean that we should use maybe and unknown

from openfoodfacts-dart.

blazern avatar blazern commented on June 18, 2024

There should be both maybe and unknown elements.
For example: enum VeganStatus { IS_VEGAN, IS_NOT_VEGAN, MAYBE, UNKNOWN }

The difference between maybe and unknown could be significant for some kinds of applications. For example:

  • When a product has unknown vegan status, that means that 1+ of its ingredients have unknown vegan status - such ingredients either are not in the ingredients.txt file yet, or their vegan status there is not specified yet.
  • When a product has maybe vegan status, that means that 1+ of its ingredients have maybe vegan status - such ingredients are present in the ingredients.txt file and their vegan status is explicitly specified as maybe (or is inherited from parent ingredient type), which means that they could be both vegan and non-vegan, the actual status depends on how the ingredient from a concrete product was manufactured.

from openfoodfacts-dart.

stephanegigandet avatar stephanegigandet commented on June 18, 2024

I agree, we should have both "maybe" and "unknown".

from openfoodfacts-dart.

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.