lua-users home
lua-l archive

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


It was thus said that the Great Thomas Jericke once stated:
> On 04/10/2014 09:38 AM, steve donovan wrote:
> >It's a little awkward with string keys : t["one","two"], but not awful. 
> 
> Let's assume you could use the proposed "in" syntax for string keys:
> 
> Currently we have
> 
> t["one"]
> and
> t.one -> t["one"]
> 
> Additionally there would be:
> t["one", "two"]
> and
> one, two in t -> t["one", "two"]

  Question:  What does the following mean?

	foo = { a = 1, b = 2, c = 3 }
	bar = { x = 'one' , y = 'two' , z = 'three' }

	a,b,c in foo = x,y,z in bar

  How about:

	foo = { a = 1 , b = 2 , c = 3 }
	bar = { x = 'one' , y = 'two' , z = 'three' }
	baz = { one = 'alpha' , two = 'beta' , three = 'gamma' }

	a,b,c in foo = x,y,z in bar in baz

  -spc (I can neither confirm nor deny my approval for this)