[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: question about cdata type identification
- From: Tony Finch <dot@...>
- Date: Mon, 18 Apr 2011 17:24:28 +0100
Francesco Abbate <francesco.bbt@gmail.com> wrote:
>
> For the other side you could implement a method called, let say, 'ctype'
> that return its ctype as a string. Since you can define the __index
> metamethods this is rechnically possible. The problem is in this case
> that if I call x.ctype() when x is another cdata which is not aware of
> this convention an error can be raised. Of course you can catch the
> error but the function would begin to look seriously over-complicated.
Surely if that happens there is a bug somewhere else that should be fixed.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Rockall, Malin, Hebrides: South 5 to 7, occasionally gale 8 at first in
Rockall and Malin, veering west or northwest 4 or 5, then backing southwest 5
or 6 later. Rough or very rough. Occasional rain. Moderate or good,
occasionally poor.