Giter Club home page Giter Club logo

Comments (2)

tomghuang avatar tomghuang commented on June 5, 2024 1

@paul-chambers I never expect that some day I will have an interview with some one asking questions in Argtable3. Now I know how small the world is, and I am glad that I always try my best to answer questions in GitHub. 😄

from argtable3.

tomghuang avatar tomghuang commented on June 5, 2024

@paul-chambers There are several issues to combine both config file parsing and command line parsing in a single library. First, it will make the library too large for people who only want to use the config file parsing API or the command line parsing API of the library. Second, there are already too many config file formats, and creating a new one seems doesn't help the community too much. Third, if we want to build in any existing config file parser, people who use other formats won't be comfortable.

I think config file parsing and command line parsing are better separated, because you'll have freedom to choose any config file parsing library you like. Besides, it should not be too hard to achieve what you want.

For example, you can load the config file and put all the keys and values in an internal dictionary. At the same time, you can override any key by specifying the new value in command-line option:

$ myprog --config myconfig.json --set key=new_value

The new value will override the old value in the internal dictionary. That's how I implement my applications. I've combined the power of argtable3 and many config file parsers, and I'm glad that I can choose whatever config parser I need for a specific project.

from argtable3.

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.