lua-users home
lua-l archive

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

---- Original message ----
>Date: Tue, 19 Feb 2008 20:01:32 -0500 (EST)
>From: Matthew Paul Del Buono <>  
>Subject: Re: Index with multiple parameters?  
>>vertex_vector[20, 'x'] = 2.5
>Would vertex_vector(20, 'x') be a suitable solution? If so, you just have to implement the __call metamethod. I disagree with your "multi-indexing" as, personally, it seems less readable; then again, I'm probably not one of your target users.
>Good luck,
>-- Matthew P. Del Buono

A few seconds after posting this I realized this wouldn't really be an acceptable solution given that you need an l-value to assign to ><

I guess it would still be possible that way, just difficult. Probably not worth it.

I'm going to have to side with the people saying use get/set methods. It's a pretty standard form anyway.

Sorry about the noise :)
-- Matthew P. Del Buono