3 ms·
Wow! Thank you so much for the explanation. This is indeed treating it as a query language. I had originally thought this library is basically eval + Proxy, an
by lioeters 7y ago
Wow! Thank you so much for the explanation. This is indeed treating it as a query language.
I had originally thought this library is basically eval + Proxy, an approach I had explored before a bit, for running user-written scripts. Funny enough, I've also gone down the road of developing a mini-language, which has a check on each parsed instruction, to have detailed control of its execution.
I didn't realize the "remote function" gets parsed and transpiled on the server.
Using a custom Babel plugin to transform the source, placing a check on each step, that is genius.
Oh, and I see there's an in-memory cache, using the source itself as a Map hash. Practical.
Seeing the depth of thought that's gone into it, I really think you are onto something with this. It deserves more attention than it's gotten so far. I'm sure many people love this kind of meta-level language wizardry.