Giter VIP home page Giter VIP logo

Comments (3)

wavebeem avatar wavebeem commented on May 17, 2024

It's extra confusing when you think about JS-land where "promise" is the readable portion of a future-like thing, and the constructor function is the writable portion.

When you get around to making Lux compile to JS, there will need to be at least support for promises to deal with native APIs returning them.

Can the other approaches be implemented in a single-threaded environment like JS?

from lux.

 avatar commented on May 17, 2024

Can the other approaches be implemented in a single-threaded environment like JS?

For that, I'd just need to do the same tricks ClojureScript uses for its core.async implementations.
It's definitely do-able.

When you get around to making Lux compile to JS, there will need to be at least support for promises to deal with native APIs returning them.

That could be done by having a function for translating JS's promises to Lux's.
Another alternative would be to just use a JS-native promise implementation (though I don't know how feasible that would be, as I don't know if there are JS-promises in all modern browsers...)

from lux.

wavebeem avatar wavebeem commented on May 17, 2024

Promise support is decent but not perfect http://caniuse.com/#search=promise

Using native has the benefit of better console debugging, so it might be worth including an optional shim and otherwise using native.

screen shot 2015-11-25 at 11 10 51 am

from lux.

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.