lua-users home
lua-l archive

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



I've done that, of course. :)

The issue is, in larger programs its really benefitial to have the _option_ of using type constraints on your variables, values, and return values. Doing them integrated with the syntax simply hides them more from the eye than doing 'assert' everywhere.

Perhaps people don't see the urge for this; I wouldn't either in smallish programs. But let's consider things s.a. svn 2.0 considering use of Lua (without them actually _knowing_ about the language beforehand!) as part of their core implementation. If I were doing such code, I'd like to have them checks!

-asko


Mike Kreuzer kirjoitti 23.10.2006 kello 12.32:

askok@dnainternet.net wrote:
I'm repeating the request for help, from people interested in getting function parameter, local var, and return value constraints to Lua.
[I missed this the first time around, and I'm probably being more than
unusually dense, so apologies in advance, but ...]

What's wrong with checking in the function, or after it's returned?  I
don't see the issue.

Regards,
Mike Kreuzer
www.mikekreuzer.com