lua-users home
lua-l archive

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


On Wed, Aug 12, 2009 at 2:11 PM, steve donovan<steve.j.donovan@gmail.com> wrote:
> On Tue, Aug 11, 2009 at 3:18 PM, Duncan Cross<duncan.cross@gmail.com> wrote:
>> So, what do people think? Is it something you'd ever use? Is it just
>> too ugly and weird?
>
> I think one meaning for ... is enough ;)  Have you considered it as a
> function, say 'explode'?  That would be more visually distinctive.

You mean, have something that looks like a function call but is
actually not? So these would work:

printvalues(explode(multivalues()), 4, 5, 6)
ar2 = {explode(multivalues()), 4, 5, 6}
p,q,r,s,t,u = explode(multivalues()), 4, 5, 6

If not, and you mean an actual function that simulates it somehow, I'm
not sure how it would work.

> However, it ends up as yet another rule that people have to learn.

That's a pessimistic way of looking at it :) It'd be another "tool"
people can choose to learn about and use, probably if and when they
come across a problem that it would help for.

-Duncan