[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: dot encoded string key
- From: Fabien <fleutot+lua@...>
- Date: Fri, 8 Jun 2012 11:05:29 +0200
On Fri, Jun 8, 2012 at 8:38 AM, steve donovan <email@example.com> wrote:
Ah, but then you would need to extend the meaning of 'path' like so
'.two' (because '1.two' means t['1']['two'])
After trying most reasonable alternatives in luasched, we've settled with "1.two" being the only canonical notation for paths; it means ["two"], and there's no way to denote ["1"]["two"]. It appears to be the best compromise between simplicity and usefulness, although I'm sure you can invent pathological cases where it causes issues.