Giter Site home page Giter Site logo

Comments (2)

mplatvoet avatar mplatvoet commented on May 18, 2024

The limitation of vargarg or any other sequence type is that it can only be typed as a whole. Thus when combining/zipping/merging promises of different types you have to resort to a more general type. E.g.:

val p1 : Promise<String, Exception> = //...
val p2 : Promise<Integer, Exception> = //...

//function all does actually exist since 0.1.0 but is undocumented
//since I haven't made my mind up about the signature
val combinedP : Promise<List<Any>, Exception> = all<Any, Exception>(p1, p2)

To use the values you either have to cast the results of new List or I have introduce get() on the promises treat all more like a latch. get() is one of the considerations of introducing.

It would be interesting whether in the future the Kotlin compiler would be flexible enough to retain types for variable lengths of arguments. There seems to be some groundwork for this with functions in the upcoming M12

For now the Tuples serve a distinct purpose and therefor will stay.
Closing this issue since there is no viable alternative yet.

from kovenant.

mplatvoet avatar mplatvoet commented on May 18, 2024

Everything that has to do with combining is moved to a separate project. So you can cherry pick. See http://komponents.myjetbrains.com/youtrack/issue/KOV-5

from kovenant.

Related Issues (14)

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.