Remix.run Logo
kentonv 4 days ago

> I wonder why they don't just do `.toString()` on the mapping function and then parse the resulting Javascript into an AST and figure out property accesses from that.

That sounds incredibly complicated, and not something we could do in a <10kB library!

actionfromafar 4 days ago | parent | next [-]

Maybe Fabrice Bellard could spare an afternoon.

sonthonax 4 days ago | parent | prev [-]

To the contrary, a simple expression language is one of those things that can easily be done in that size.

kentonv 3 days ago | parent [-]

But the suggestion wasn't to design a simple expression language.

The suggestion was to parse _JavaScript_. (That's what `.toString()` on a function does... gives you back the JavaScript.)