[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntactic sugar for function calls
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 23 Feb 2003 22:12:52 -0300
>I was playing around with calling functions without the brackets, if
>they take only one parameter, and it is a string or table this evening.
>
> function user(t)
> ...
> end
>
> user { name = "Joe Bloggs", password = "wibble" }
>
>Works, where adding another function, say:
>
> function hosts(t)
> ...
> end
>
> user { name = "Joe Bloggs", hosts { "jbloggs.bigco.com" } }
>
>Does not. Which seems a shame. Is it me just getting something rather
>stupidly wrong, or can I not do this? Is there an alternative method in
>the same vain? (this is for a configuration file.)
In what sense does this second example not work? Perhaps hosts should return t?
--lhf