我来自Python背景,非常喜欢Python Decorators的强大功能。
Lua支持Decorators吗?
我阅读了下面的链接,但是我不清楚:http://lua-users.org/wiki/DecoratorsAndDocstrings
更新
如果可能的话,您能否给出一个在Lua中实现它的示例。
我来自Python背景,非常喜欢Python Decorators的强大功能。
Lua支持Decorators吗?
我阅读了下面的链接,但是我不清楚:http://lua-users.org/wiki/DecoratorsAndDocstrings
更新
如果可能的话,您能否给出一个在Lua中实现它的示例。
lambda
也差不多 - 就像在Javascript中一样,它们具有基本相同的功能和几乎相同的语法,就像“正常”的命名函数!-)。
continue
和+=
等基本功能)。 - Glenn Maynard