[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Array Logical Operators
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 24 Oct 2011 08:44:10 +0200
On Sun, Oct 23, 2011 at 7:31 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> What you need metamethods for is not `and`, `or` and `not`. It's metamethods
> for `&`, `|` and `~` (or `!`), which are not in Lua yet. They'd be
> nice to have,
> being predefined for boolean and number (i.e. bit32.band, bit32,bor
> and bit32.bnot)
Nice one, Dirk! Not only useful in themselves, but full of
entertaining overloading possibilities.
E.g. the pipe operator | (assuming the correct associativity) for
process chains.
steve d.