unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 13419@debbugs.gnu.org
Subject: bug#13419: make 'eabs' act more like a function
Date: Sat, 12 Jan 2013 19:26:55 -0500	[thread overview]
Message-ID: <jwvobguc4qy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <50F1EC7D.6050609@cs.ucla.edu> (Paul Eggert's message of "Sat, 12 Jan 2013 15:06:37 -0800")

>> 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





  reply	other threads:[~2013-01-13  0:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12  6:44 bug#13419: make 'eabs' act more like a function Paul Eggert
2013-01-12  9:11 ` Eli Zaretskii
2013-01-12 13:25 ` Stefan Monnier
2013-01-12 23:06   ` Paul Eggert
2013-01-13  0:26     ` Stefan Monnier [this message]
2013-01-13  1:41       ` Paul Eggert
2013-01-19 22:36         ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvobguc4qy.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13419@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).