3 ms·
Caveat: I haven't used Fennel but just inferring from what makes sense... The Lua VM that they compile to already handles missing arguments with some attendant
by munificent 3y ago
Caveat: I haven't used Fennel but just inferring from what makes sense...
The Lua VM that they compile to already handles missing arguments with some attendant but unavoidable performance cost.
Fennel's own `lambda` form that they layer on top does check for missing arguments, but it must do so by generating extra Lua code to do those checks. That additional code has a runtime cost.
Using `fn` avoids that extra generated code and its cost.
If Fennel had its own runtime and VM, then the performance story for how missing arguments are handled would be different.