[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Number 2 String( LUA_NOCVTN2S ) and numbers and concat...
- From: Andrew Starks <andrew.starks@...>
- Date: Fri, 27 Mar 2015 08:18:51 -0500
On Friday, March 27, 2015, Pierre Chapuis <email@example.com> wrote:
> 2015-03-26 23:42 GMT+02:00 Andrew Starks <firstname.lastname@example.org>:
> So I'm sure that what you wrote is more helpful than the brutal no-thanks
> of the lazy majority (including me) who gave up on them without trying.
For what it's worth, I was very enthusiastic about those macros and I did
try them. I still have my main Lua built with NOCVTS2N on my laptop and I
do not remember it causing any issue (I had kind of forgotten it was still
NOCVTN2S is more annoying because several libraries depend on this
behavior, like in this example.
I think this is an issue for very generic libraries that really don't know anything about the values that they are concatenating, such as pl. If you want to respect __concat and tostring things that don't have it, then you have to check in ways that aren't that great.
But that probably isn't a problem outside of generics. Conceptually at least, it might be cleaner if every Lua value defined their __concat event so as to work for the string case. But again, I don't know and have not tested if this would make everything slower and if there would be an every-day gain to such a modification.
It's easy to try but I'm weighing that experiment against the prospect of just turning the flag off.