lua-users home
lua-l archive

Re: Lua 5.3: 1 Month of use

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


2014年03月04日 11:27 GMT+02:00 Pierre Chapuis <catwell@archlinux.us>:
> I think Lua 5.3 may be a good time to remove all coercion from string
> to number and from number to string from the language.
String to number, yes. Number to string, no.
> It means you should not be able to do this:
>
> answer = "6" * 7
One can always define metamethods for strings, so I can live with this.
> or this:
>
> print(string.format("the answer is %s", 42))
>
Actually "%s" allows anything. The Lua equivalent of Python "%r".
> print(string.format("%s",io.stdin))
file (0xb7719ac0)

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