[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: strings
- From: Petite Abeille <petite.abeille@...>
- Date: Thu, 17 Dec 2009 07:28:46 +0100
On Dec 17, 2009, at 7:20 AM, steve donovan wrote:
> Yes, so like others, I've written utility functions to detect the
> 'effective' type of an object. This depends on the OOP style used, so
> it can never be standard.
OOP or not, a module _NAME could be used for such purpose, e.g.:
local function Type( anObject )
if type( anObject ) == 'table' then
return anObject._NAME or ( getmetatable( anObject ) or {} )._NAME
end
return type( anObject )
end
- References:
- strings, Hans Hagen
- Re: strings, steve donovan
- Re: strings, Hans Hagen
- Re: strings, Michal Kolodziejczyk
- Re: strings, Mark Hamburg
- Re: strings, Alexander Gladysh
- Re: strings, steve donovan
- Re: strings, Jerome Vuarand
- Re: strings, Cosmin Apreutesei
- Re: strings, steve donovan