Coder Social home page Coder Social logo

koda's People

Contributors

adelevie avatar keithasaurus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

koda's Issues

Rapid changes to the API

I love this project!
Just noticed that the library had a few changes that broke my tests:

  • 1.2.0: OK(val=...)
  • 1.3.x: <koda.result.Ok object at 0x0000017B109DBB80>
  • 1.4.0 Ok(...)

I guess the latest is the best :-)

[question] Is there a preferred way to encode the "unit" type?

Hello there, thank you for the work you've done on this project!

I was curious if there was a supported or preferred way to encode the unit type () within koda which is commonly found in many functional programming languages? I realize that () works syntactically in Python but it represents the empty tuple rather than unit. Alternatively, I suppose use of None could also be used instead of Unit but the issue is this won't work with common type checking tools like mypy/pyre/pyright etc. I looked around the source code to see if there was something similar to how nothing is defined but for unit but couldn't find anything.

It would be great to be able to write something like:

def example(...) -> Result[Unit, str]:
    if ...:
        return Ok(())
    else:
        return Err("something went wrong")

Do you have any advice on how to do this? If this is something you'd be interested in adding I would be happy to contribute. Thank you in advance for any insights!

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.