Mechanism Not Policy

lua-users home

That Lua provides "mechanisms not policies" is a design principle followed by Lua. says "Lua is powerful (but simple): A fundamental concept in the design of Lua is to provide meta-mechanisms for implementing features, instead of providing a host of features directly in the language. For example, although Lua is not a pure object-oriented language, it does provide meta-mechanisms for implementing classes and inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the language small, while allowing the semantics to be extended in unconventional ways."

"The Evolution of Lua" [1] discusses more in-depth how mechanism and policy have guided the design of Lua.

Policies were, however, set in the Lua 5.1 module system, as noted in the Evolution of Lua paper and [PiL 2, Chap 5 Modules and Packages]. LuaList:2011-10/msg00485.html notes how this pertains to 5.2, which deprecated the module function (LuaModuleFunctionCritiqued).

Mechanism and policy discussions are not specific to Lua but also occur more broadly in other areas of computer science:

RecentChanges · preferences
edit · history
Last edited January 10, 2012 2:09 am GMT (diff)