lua-users home
lua-l archive

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


Sorry I came in late into this discussion but I come from a functional world, Erlang. It's reasonably functional anyway.

I don't see why you would want to add a new functional syntax have you already have. If the syntax is too verbose then fix it instead of adding something completely different. Just swap 'function' for '\', the unix people will get used to it. :-)

Making Lua more functional is actually a very big change if you are going to do it properly, not just adding some immutable cons cells and functional objects. It does change your whole style of programming and will change some fundamental properties of the language. For example equality changes meaning when you go to an immutable world. Also having both mutable and immutable data can become a right mess if you are not very careful.

Robert

----- Original Message -----
> Jay Carlson <nop@nop.com> wrote:
> 
> > I wonder if there's a vertical variant of list comprehensions.
> 
> Haskell's do notation coupled with the list monad, sort of.
> 
> Tony.
> --
> f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
> Shannon, Rockall, Malin, Hebrides: South veering northwest 5 to 7,
> becoming
> variable 4, then southeast 5 or 6 later in Shannon and Rockall. Rough
> or very
> rough. Occasional rain. Moderate, occasionally poor, becoming good.
> 
>