lua-users home
lua-l archive

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



> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of
> Asko Kauppi
> Sent: Monday, October 23, 2006 11:38 AM
> To: Lua list
> Subject: Re: Constraints patch - help?
> 
> 
> Tastes differ.
> 
> For local variables, because assert needs to be there N times, a
> constraint is given just once and applies throughout that variable's
> lifespan (checked at every assignment).
> 

However this starts to make the language into a strongly typed language which Lua is not meant to be. IMO one of great things about
Lua is it doesn't try to do too much (read Java).  I use Lua primarily as an extension language at which it greatly excels. For this
purpose, explicit strong typing might be considered overkill. Even if it were optional, the required changes to the language may
hurt performance which I think is a bad trade off. 

Having an optional type check at function call or return time is a more modest proposal but I'm still not convinced it is really
needed.