Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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!



Maybe Fabrice Bellard could spare an afternoon.


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


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.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: