Giter VIP home page Giter VIP logo

Comments (5)

flyx avatar flyx commented on July 29, 2024 1

The current defaults came to be because I decided to implement YAML according to the spec, ignoring common use-cases and other implementations.

YAML was originally designed to allow different applications to communicate data. Nowadays, YAML is mostly used as configuration language that is only read (and sometimes written) by a single application, in which case most of its more complex features are unnecessary.

Since the defaults of NimYAML were designed for the original use-case, they seem unnecessarily complex in typical scenarios. That being said, NimYAML has been out and used for quite some time, and changing defaults now may break other people's code, so I'd rather not do it.

Omitting the --- is certainly missing as a presentation option, that can be added. I am also aware of the trailing whitespace problem.

As for your other suggestions, maybe a function simpleDump can be added that uses your proposed defaults.

from nimyaml.

flyx avatar flyx commented on July 29, 2024 1

Whitespace and --- have been addressed. I did some other improvements to the presenter while I was at it.

Concerning the defaults, I decided to do a new major version, NimYAML 2.0.0, to be able to introduce breaking changes. I am more comfortable releasing the presenter changes with such a version, since the changes I made will cause existing code emit different YAML and I'm not confident that this will cause no problems. This version will then also contain the changes to the defaults you requested.

I will start working on the new version once a final Nim 2.0.0 version is released, since that will probably need some more adjustments.

from nimyaml.

flyx avatar flyx commented on July 29, 2024 1

I don't think a PR would make sense. Seeing that breaking changes are possible, I possibly want to remodel the dumping API to have a Dumper object which stores the arguments to dump since it's somewhat awkward giving those every time, and having an object makes it easier to add features in the future.

from nimyaml.

flyx avatar flyx commented on July 29, 2024 1

This is now fully be implemented and will be part of NimYAML 2.0.0. Release should be soon, I only need to write up migration docs as I broke some APIs.

from nimyaml.

theAkito avatar theAkito commented on July 29, 2024

Whitespace and --- have been addressed. I did some other improvements to the presenter while I was at it.

Concerning the defaults, I decided to do a new major version, NimYAML 2.0.0, to be able to introduce breaking changes. I am more comfortable releasing the presenter changes with such a version, since the changes I made will cause existing code emit different YAML and I'm not confident that this will cause no problems. This version will then also contain the changes to the defaults you requested.

I will start working on the new version once a final Nim 2.0.0 version is released, since that will probably need some more adjustments.

Sounds great!! 🙂

I was planning to provide some simpleDump Pull Request. Does that still make sense or would it be a waste of time, as of now? 🤔

from nimyaml.

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.