lua-users home
lua-l archive

Re: duplicated local variables with same name

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


On Thu, Jun 18, 2015 at 2:54 PM, Brigham Toskin <brighamtoskin@gmail.com> wrote:
> Yeah, that's why I mentioned Go. you can do
>
> foo := 25
> foo := "I'm a foo!"
> foo = 25 // ERROR! foo is type string!
sure? AFAIR, in Go redefinition is an error... (unless in the same
statement you define another variable for the first time)
-- 
Javier

AltStyle によって変換されたページ (->オリジナル) /