Git Product home page Git Product logo

Comments (4)

zinid avatar zinid commented on August 28, 2024

Well, in that case we need to add checks in many places of encoding functions. I don't think we need this burden really. For example, in the same encode_via we should check Proto, Transport etc have correct values.

from esip.

wanglihe avatar wanglihe commented on August 28, 2024

I agree with you that it is difficult to check every mistake, but that is codecs should do. Every mistake create by compilers will make bugs far far away and debug is very difficult, I have just spent about 3 hours to catch one, it is dangerous. Maybe it is not the good time to fix it right now, but it should be fixed as soon as possible.

from esip.

zinid avatar zinid commented on August 28, 2024

Then you probably chose a wrong language. That's a common problem of duck typing. When you put wrong values to some built-in OTP functions you will get pretty cryptic errors as well. Also, the error you're talking about is not that cryptic, typically you will get badarg which is pretty easy to understand.

from esip.

wanglihe avatar wanglihe commented on August 28, 2024

Erlang says: crash as soon as possible. I am not choose wrong, and this is not a problem of duck typing. OTP try to throw exceptions everywhere, debug is easy. BTW, is Erlang's type system duck typing? I thought duck typing is something about OO, not functional languages. Maybe I was wrong. This issue is only a suggestion, try to make esip better and easier to use.

from esip.

Related Issues (7)

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.