[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.3: functional version of // operator?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 8 Jul 2013 10:31:17 +0200
2013/7/8 Miles Bader <firstname.lastname@example.org>:
> steve donovan <email@example.com> writes:
>> On Mon, Jul 8, 2013 at 9:31 AM, Miles Bader <firstname.lastname@example.org> wrote:
>>> Hmm, I think I'd prefer math.idiv... oO;
>> Why not just check _VERSION, unless I'm missing a subtlety?
> (1) doesn't work
> (2) _VERSION checks are ugly/flaky anyway, I'd prefer feature checks
> where possible (e.g. the way it checks whether math.ifloor is nil
> or not)
> Rena's version will "work" but it's gross...
<sigh> here we go again ... </sigh>
If compatibility with 5.2 is that crucial, why insist on writing code
that in Lua 5.3 will return true integers? Why not just write in Lua
5.2 and trust the developers to provide a compatibility option?