lua-users home
lua-l archive

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

On Mon, Jun 2, 2014 at 10:24 PM, Elias Barrionovo
<> wrote:
> Well, it's a bit OT and nitpicking, but in Python when you do this:
> def foo(a, b):
>   return a, b
> you are actually returning only one value, (a, b), which is an
> instance of tuple [1]  (parenthesis is optional for tuple literals).

And that's the point - it's more expensive than it looks.  True
multiple returns in Lua and Go are cheap.  (In both languages, often
used for distinct error returns)

That's why I prefer Lua to Python - there is less 'convenience magic' happening.

As for Swift - it's fashionable for big companies to have their own
new programming language. A well-known advertising agency [1] has
spawned at least two recently. Despite its oddities, Swift seems a lot
more readable than Objective-C, which always made my eyes bleed.

[1] Google (Go and Dart)