[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: question on local vs nonlocal
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Sat, 16 May 2020 12:04:37 +0200
On 13/05/2020 00:47, William Ahern wrote:
On Tue, May 12, 2020 at 08:50:03AM -0700, Andrea wrote:
[snip]
variables. Lua is a functional languge that permits OOP with some syntactic
sugar and metatable semantics. In modern functional languages closures are
Not to be a nitpicker (and I'm not arguing against what you say in the
rest of your post), but calling Lua a functional language seems a bit
too strong to me.
I completely agree that functional features (especially closures) are
quite a fundamental part of Lua, but so are more imperative features.
Lua code can be written in a pure imperative style, without using
functional features and heavily relying on side effects, and it doesn't
seem unnatural or harder.
At the same time, I agree that (with proper conditions, i.e. function
definitions, and practice) you /can/ write Lua code that looks mostly
functional and doesn't feel alien.
The fact is, IMO, Lua cannot be framed in either category, since it
supports both paradigms (with a slight imperative flavour,
out-of-the-box) with ease. And that is one of its selling point.
[snip]
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org
Cheers!
-- Lorenzo
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org