On 2013-07-08 4:12 AM, "Miles Bader" <email@example.com> wrote:
> steve donovan <firstname.lastname@example.org> writes:
> > On Mon, Jul 8, 2013 at 9:31 AM, Miles Bader <email@example.com> 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...
> Conservative, n. A statesman enamored of existing evils, as opposed to a
> Liberal, who wants to replace them with new ones.
You could certainly check for the existence of 5.3 functions instead, and that might be cleaner... (and I feel it'd be faster, but you only need to check once either way.) Nothing prevents you from assigning to math.idiv either.