[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.3: 1 Month of use
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 4 Mar 2014 12:19:34 +0200
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)