lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Friday, July 19, 2013, Joshua Jensen wrote:
----- Original Message -----
From: steve donovan
Date: 7/19/2013 10:25 AM
On Fri, Jul 19, 2013 at 6:01 PM, Dirk Laurie <> wrote:
number    integer

Ah, but suddenly a function which has only returned one value returns two .. here again I'm reminded of the special care one must take with string.gsub.  Better it be a different function, then.

print(type(1, 'subtype'))
number    integer



Or the possibly buggy approach of:

number, integer

I think subtype is very nice, but I overload type to work with hierarchies of types (more than two). Subtype could be used in the same way, but it struck me as singular, like type is. 

- Andrew