Comments (3)
We can't use conditional reading because conditional reading will only pick one feature (out of web and native) while we must compile both to a single codebase.
Then it's going to be a special form.
(dart/sniff
dart:io (some native code)
dart:html (some web code))
could we lift these expressions to distinct files and emit conditional imports automatically?
We should also modify ns
to allow to specify :when
in a require.
from clojuredart.
See #128
from clojuredart.
Let's ponder about
(dart/sniff
dart:io (some native code)
dart:html (some web code))
My original idea was to have it replaced by some function call and the function being defined in a conditionally imported lib.
However this approach is going to create weird cases when for example you have an await or a recur inside the expressions (because then they would apply to the extracted function).
My new idea is to have a new special in "dart sexp" (our representation of the subset of dart code we produce) too. Then we would just walk the top-level code in search of a dart/platform-case
and if found we would produce dart/platform-case
-free variants that we would dump in conditionally imported helper libs.
from clojuredart.
Related Issues (20)
- LD -XLinker is invalid option compiling for native app HOT 8
- multiple bindings in :bg-watcher
- Support multiple bindings in `:bg-watcher`
- doseq and for but for streams
- Add a "nano pass" to the compiler to perform statements lifting
- Stop generating dart functions HOT 1
- Make magicast open
- `:keep-alive` on `f/widget` HOT 1
- Can't `with-open` HOT 4
- Printing cyclic data structure causes stack overlow HOT 1
- `doseq` with `await` in body evaluates to a future HOT 1
- cljd type parameter inference on static methods could be better
- Error: Can't use an expression of type 'void Function()?' as a function because it's potentially null.
- static methods on interfaces backing protocols
- Type hinting a `Future` fn won't compile
- Resolution of types across conditional import/export
- Loose type inference on functions that are type hinted
- How to write this go_router example in this? HOT 9
- (docs) Minor typo in the cheatsheet HOT 2
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 clojuredart.