Coder Social home page Coder Social logo

Comments (3)

thomashoneyman avatar thomashoneyman commented on September 27, 2024

If we went forward with this, ideally we would:

  1. Write up a rationale for why typed errors are an improvement over string errors -- something short, but which lets users know what motivates the change
  2. Make the change to typed errors with the expectation that the error type will be stable in the future (we're not going to keep adding and removing error cases). Using the same error type as purescript-codec-argonaut is a good idea.
  3. Ensure that users can easily recover the string errors from the error type (being able to do lmap errorToString decodeJson is fine), to make their migration easier if they just want to continue using String and avoid rewriting too much code
  4. Write a short migration guide that helps users switch with minimum effort -- ie. examples of switching to use the new error type and examples of how to keep using String if that's what you want.

You don't necessarily need to do all of that as your PR, but I think each of these four should be in place to make the breaking change across quite a big part of the ecosystem.

from purescript-argonaut-codecs.

srghma avatar srghma commented on September 27, 2024

Ok, I will prepare pr but leave documentation for you

from purescript-argonaut-codecs.

thomashoneyman avatar thomashoneyman commented on September 27, 2024

Closed by #73

from purescript-argonaut-codecs.

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.