Coder Social home page Coder Social logo

migrate to antlr / javacc about config HOT 4 CLOSED

 avatar commented on July 24, 2024
migrate to antlr / javacc

from config.

Comments (4)

diwakergupta avatar diwakergupta commented on July 24, 2024

I agree; the hand crafted parser isn't very maintainable. One of the advantages of using a standard format like JSON or YAML is one could leverage off-the-shelf libraries like Jackson and/or Snakeyaml. Of course, that would add a dependency. As always, there are trade-offs to consider...

from config.

viktorklang avatar viktorklang commented on July 24, 2024

The entire idea behind Config was to use only JDK – otherwise we'd used Scala for it. So it needs to be 0 deps.

from config.

havocp avatar havocp commented on July 24, 2024

fwiw, I don't think we'd ever make back the time spent converting to a parser generator. There have been very few bugs reported in the parser and back compat concerns mean the format won't change much.

I personally find a recursive parser like the current code pretty straightforward (and it's also how some JSON libs I've seen are written), but I understand tastes differ on that.

If doing something like this, a concern of mine would be to retain at-least-as-good error messages.

The whole emphasis here (and why we don't just use JSON) is to put more work on us maintaining this config library, in order to put less work on people writing config files. So we don't want to have less maintenance work here if there's a cost in work for people using the library.

The maintenance work right now is essentially zero anyhow - there are hardly any commits, and the bugs are (as far as I remember) "this would be a nice enhancement" kind of things, not "it's broken" kind of things. But if there are some "it's broken" I'm ignoring please let me know ;-)

It's hard to do too much "would be nice" without broadening scope, adding complexity, adding code size, but I expect we'll do a few things here and there.

Some performance work might be nice, but then I'm not sure loading config files tends to be on the critical path.

from config.

 avatar commented on July 24, 2024

just a reminder : you promised to do pull 32 after v 1 release :-)

from config.

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.