News for hackers. Stuff that matters.
Re:Why Fennel? by rpdillon on Wednesday September 13, 2023 @01:28PM (#37499218)
I'm not an expert, but my understanding is the Lua has a very limited grammar that is specifically designed to be parsed in a single pass. This precluded Lua from performing arity checks on function calls.

Fennel does support arity checks but it comes with a runtime cost since it's implemented as a separate Lua call after being transpiled from Fennel.

Re:Why Fennel? by vore on Wednesday September 13, 2023 @03:37PM (#37500772)
The grammar shouldn't have anything to do with arity checking – at runtime, you're going to know if you passed a function 2 arguments or 3 arguments, and due to the presence of dynamic evaluation, knowing how many arguments a function takes is not statically knowable anyway. My best guess is that they want to avoid the overhead of a runtime check for arity.