Comments (3)
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.
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.
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.
from lux.
Related Issues (20)
- `lein lux build` doesn't work (JDK9) HOT 1
- Proposal to simlify module imports HOT 12
- Add integration with dev tools HOT 4
- Exception when trying to build HOT 2
- Exception when trying to launch repl HOT 5
- Lux and GraalVM ? HOT 2
- Start Up Time HOT 2
- Questions about syntax HOT 3
- Clarify URL for "The Lux Programming Language" HOT 2
- Specify known good versions of JDK and Leiningen in documentation HOT 3
- Commercial License? HOT 2
- Integrate ideas from unison HOT 1
- Gitbook link does not work HOT 1
- Exception when trying to run program built with Lux HOT 7
- Aedifex doesn't run in headless JVMs HOT 1
- There needs to be a features matrix for each backend HOT 3
- Document use of sigils in standard library HOT 1
- JS build fails for hello world example HOT 3
- how to manual install ? HOT 3
- Build failure on 0.8.0 for Hello World example from book HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lux.