Replies: 6 comments
-
@borkdude let me know if you'd prefer these issues in https://github.com/squint-cljs/compiler-common |
Beta Was this translation helpful? Give feedback.
-
@aleedmanath Good to hear! The issue here is fine, but if/when we implement this, it will probably be the same for squint as well. |
Beta Was this translation helpful? Give feedback.
-
In JS it is done based on file names. Example: Swift recently introduced Conditional Compilation Block, which is similar to how it's done with reader conditionals in Clojure |
Beta Was this translation helpful? Give feedback.
-
I guess for now the JS way would also work with cherry/squint? |
Beta Was this translation helpful? Give feedback.
-
I'll have to try it, didn't consider it since Clojure/Script is finicky with file/namespace names Earlier this year I spent some time seeing how Shadow-cljs implemented this, in case linking to code would be helpful for discussion. Though I understand if this is not a priority right now! |
Beta Was this translation helpful? Give feedback.
-
I'll leave this issue open so we can collect more feedback from more users. I think the JS way would work with cherry / squint too. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This will allow using Cherry in multiple environments and for cross-platform applications. It's the only feature I find missing coming from shadow-cljs (https://shadow-cljs.github.io/docs/UsersGuide.html#_conditional_reading).
Basic example of usage:
By the way, I got Cherry working with Expo's new file system Router (https://expo.github.io/router/docs) along with Nextjs. So new capabilities are truly opening up for leveraging best tools in JS ecosystem. Custom reader conditionals will allow us to all the way to writing cross-platform apps.
Beta Was this translation helpful? Give feedback.
All reactions