%raw keyword #909
Closed
umuro
started this conversation in
Squiggle Improvement Proposal
Replies: 1 comment 2 replies
-
Do you mean that users type %raw in their squiggle code, to access Rescript code? Like, in squiggle, do, %raw foo = t => t +. 3.0
foo(5.) For one thing, I think Rescript would need complication, which complicates thing. Another factor is that one of the main benefits of Squiggle is that it's sandboxed. If we expose all js/Rescript functionality, we'd lose that. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is an idea that bugs me time to time though this is not a short term issue.
Instead of providing an API for modules and function clauses, they could be in the syntax. And - like in ReScript - we can use a %raw keyword to supply the built in implementations.
This makes complicated library implementations and behaviour inheritance a breeze. And very readable.
However, there is a catch. %raw keyword can only make JavaScript calls and standard libraries are in ReScript.
Beta Was this translation helpful? Give feedback.
All reactions