lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Nov 29, 2007 4:24 AM, KHMan <keinhong@gmail.com> wrote:
Shoehorning lambda calculus into Lua, I guess, can be done in
many, many different ways. A long-winded syntax is a net loss to
the programmer, I think, as the programmer has a bigger cognitive
load to handle in order to grok the code. A math-like syntax on
the other hand, will look more like a formula, but will have a
distinctly different syntax or smell to it.

Don't focus excessively on the lambda-calulesque origins of the Y combinator. The practical service it provides is that when you rename a Y-based recursive function, you don't have to also rename its self-references in its body. That's conceptually neater. In more functional languages where half of your functions are actually recursive, it can become a hassle. Not so much in idiomatic Lua IMO, as you pointed out. And in practice, it could probably be fixed by decent refactoring tools, although refactoring tools for scripting languages are rarely decent...