Code Monkey home page Code Monkey logo

Comments (3)

josepot avatar josepot commented on August 19, 2024

I'm having second thoughts on this. I think that what I'm suggesting in here is wrong. The whole point of having a Codec type is that the output of the decoder is the same type as the input of the encoder... If that's not the case, then it's just something else, but not a Codec.

That being said, we could solve this in our end by using enhanced encoders wherever necessary... 🤔

from polkadot-api.

josepot avatar josepot commented on August 19, 2024

The more I think about this, the more I realize that we should make this breaking change ASAP. I keep finding more and more cases where the encoder and the decoder should have different types... We should tackle this before it's too late, the longer we wait the more difficult it's going to be to make this change in the future.

from polkadot-api.

josepot avatar josepot commented on August 19, 2024

Ok, so after spiking this task and I ended up realizing that this is a really bad idea.

The output of the decoder should always match with the input of the encoder.

That being said, I have come up with a very nice solution to the problem that I described above. However, I will be explaining that solution in a separate issue.

from polkadot-api.

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.