[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 11:21:58 +0200
2013/7/8 Rena <email@example.com>:
> Nothing prevents you from assigning to math.idiv either.
I like semi-global variables, i.e. local variables whose scope is
the entire file, visible as upvalues everywhere.
local idiv = require"idiv"
I'll go with Sean's modification: an idiv module for Lua 5.2 providing
a function that returns quotient and remainder. A math.idiv in Lua 5.3
is not really necessary: the 5.2/5.3 compatibility code can go into the
module source. But since work1 is the one time when the developers are
asking us, put the request on the wishlist by all means.