it's only a benefit for writing simplistic things (and configs for some complicated programs like a text editor or a terminal or some MMORPG is already not simple), otherwise you start appreciating that there is not just a single dictionary as a data type etc.
Why Fennel?
11–20 of 106 posts
Re: Why Fennel?
#12> Another common criticism of Lua is that it lacks arity checks; that is, if you call a function without enough arguments, it will simply proceed instead of indicating an error. Fennel allows you to write functions that work this way (fn) when it's needed for speed, but it also lets you write functions which check for the arguments they expect using lambda. I don't understand this; why is this a speed consideration?
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.
Re: Why Fennel?
#13I moved my Neovim config to fennel and haven't look back. https://github.com/Grazfather/dotfiles/blob/master/nvim/fnl/...
Re: Why Fennel?
#14Re: Why Fennel?
#15The decision to strictly adhere to lua runtime semantics was initially repulsive to me, but I've come to appreciate the incredible wisdom of that approach. The practical experience of using lua is that because of the constraints of the language, every lua runtime is in some ways custom & unique. This decision of fennel's creator allows you to drop fennel onto any lua codebase, of any version, with any amount of custom freak shit grafted in, and just use it. Not only use it, but hook its compiler into the lua module loader system, and freely & transparently mix functions and tables between the two languages. A life raft in decrepit legacy lua codebases.
The restraint and technical focus of this language led to me checking out janet, another project of its creator. I've also come to really like that language, it makes some similarly minor-seeming but brilliant decisions like including PEGs in the core lang instead of regex.
Anyway try fennel, if you have to interact with a lot of lua pattern match alone will improve your life. Try janet too it's cool.
Re: Why Fennel?
#16Re: Why Fennel?
#17Re: Why Fennel?
#18Oh... not the plant...
[1]: https://www.foodrepublic.com/recipes/roasted-chicken-fennel/
Re: Why Fennel?
#19> Another common criticism of Lua is that it lacks arity checks; that is, if you call a function without enough arguments, it will simply proceed instead of indicating an error. Fennel allows you to write functions that work this way (fn) when it's needed for speed, but it also lets you write functions which check for the arguments they expect using lambda. I don't understand this; why is this a speed consideration?