by bnert · 3y ago · 0 comments
From the blurb you quoted, it sounds like Lua doesn't check function argument arity natively, and fennel can. This means that fennel applies a runtime check to validate if a function was called with an expected arity, and if not, propagates an error (however Lua does that, I do not know), hence why arity checked functions are not as performant.
function M(...)
if select("#",...)>3 then
error("failed arity check on M()")
end
end