[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (work2) now available
- From: Duncan Cross <duncan.cross@...>
- Date: Thu, 14 Jan 2010 22:03:10 +0000
2010/1/14 Ignacio Burgueño <email@example.com>:
> But I can't think of a case where the length of something is not a numeric
> For me, __len has clear semantics. The length of something is measurable in
> 'n' units, with 'n' being a number.
> Using __len for other uses seems like a case of operator overloading abuse
I can think of a pretty high-profile example of this - Roberto's LPEG
library overloads the # operator for LPEG pattern objects for
something entirely unrelated to length (it "returns" a new pattern).