[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Influence of Lua on Go?
- From: Miles Bader <miles@...>
- Date: Fri, 09 Sep 2011 15:22:44 +0900
steve donovan <steve.j.donovan@gmail.com> writes:
>> Any language with native support for tuples (or equivalent constructs) can
>> do multiple returns trivially, so this dates back to Lisp at least, which
>> puts it as about 1959.
>
> Ah, but there is an important difference: this code has the same
> effect in Lua and Python:
>
> x,y = something()
>
> but in Python there is an explicit tuple type and this multiple
> assignment causes that tuple to be unpacked, which is a rather less
> efficient process.
Yeah, and "tuple based" MRV tend to have a very different ("more rigid")
feel than the looser MRV in languages like Lua and CL, and I think the
two styles often result in significantly different usage.
-Miles
--
Cat, n. A soft, indestructible automaton provided by nature to be kicked when
things go wrong in the domestic circle.