teikalang / teika

MIT License
324 stars 7 forks source link

jsend: better functions #176

Closed EduardoRFS closed 1 year ago

EduardoRFS commented 1 year ago

Goals

More legible output and hopefully faster.

Context

All Teika functions have a single parameter and right now Teika doesn't have pairs, so the generated code is quite hard to read, additionally it allocates too many closures.

This changes addresses that by grouping nested functions and using a magic $curry helper in JS, this hopefully improves performance but it also makes the generated code much more readable.