lua-users home
lua-l archive

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


> On Tue, Oct 23, 2012 at 12:46 PM, spir <denis.spir@gmail.com> wrote:
> > (But I still feel this breaks referential transparency, I can't count on a
> > func to only depend on its input... maybe it's only me.)

Any language with assignment (or other forms of mutable state) breaks
referential transparency.


> Its not you, but it isn't Lua, either. Lua supports a functional
> "style" of programming, but it isn't a functional language. Check out
> scala, erlang, haskell, scheme, kindof...

Except for Haskell, none of these languages have referential
transparency, either. Some emphasize a programming style with less
mutable state (e.g., Scheme), others just keep mutable state in other
places, not in variables (e.g., Erlang).

-- Roberto