GNU bug report logs - #13419
make 'eabs' act more like a function

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sat, 12 Jan 2013 06:51:01 UTC

Severity: minor

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 13419 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 13419 <at> debbugs.gnu.org
Subject: Re: bug#13419: make 'eabs' act more like a function
Date: Sat, 12 Jan 2013 19:26:55 -0500
>> Do you really consider this code cleaner?
> The implementation's worse, but the use is nicer,
> since eabs is guaranteed to evaluate its argument just once.

I understand this, but I think the price is too high.

> Anyway, here's a simpler implementation that also evaluates
> its argument just once: would you prefer this?
>   #define eabs(x) imaxabs (x)

But then it's not inlined, right?
I think this is trying to fix something that's not broken and
C simply does not offer a good enough alternative.


        Stefan




This bug report was last modified 12 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.