lua-users home
lua-l archive

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



On Jun 8, 2012 8:40 PM, "Javier Guerra Giraldez" <javier@guerrag.com> wrote:
>
> On Fri, Jun 8, 2012 at 6:22 AM, joao lobato <btnfdp.lobato@gmail.com> wrote:
> > In a functional language, where each
> > function is only defined by what goes in and what comes out, it makes
> > sense to return the same object modified.
>
> au contraire, in functional langues it's "more pure" to return a
> modified copy.  possibly sharing non-modified parts with the original,
> extra points if there's some COW around.
>
> --
> Javier
>

Yes, you are absolutely correct. What was I thinking, immutable objects are a huge advantage, when one can get away with it.