[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: New metamethod for method lookup
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 17 Nov 2009 11:55:13 +0200
On Tue, Nov 17, 2009 at 10:46 AM, spir <firstname.lastname@example.org> wrote:
> More generally, overloading abuse or misuse can lead to really undebuggable issues. (painfully bites!)
Oh yes! A programmer needs to need a special driver's license to
overload operators ;) The concept isn't difficult, but using it
sensibly (and not for 'fun') is tricky.
Another use of defining __call that isn't such a good idea: for an
object to return its iterator
for val in obj() do ... end
Much better to say obj:iter() explicitly.