From: Daniel Colascione <dancol@dancol.org>
To: Paul Eggert <eggert@cs.ucla.edu>, Ravi Desai <ravi@ravidesai.com>
Cc: emacs-devel@gnu.org
Subject: Re: EMACS_INT to EMACS_UINT
Date: Mon, 5 Dec 2016 09:47:34 -0800 [thread overview]
Message-ID: <866bb879-1089-7b1a-d483-0ca436cfcf29@dancol.org> (raw)
In-Reply-To: <87e592da-d808-343a-4627-b3e9387346a6@cs.ucla.edu>
On 12/05/2016 09:23 AM, Paul Eggert wrote:
> On 12/05/2016 05:56 AM, Ravi Desai wrote:
>> I was thrown off by the lack of explicit casting.
>
> All other things being equal I prefer ordinary assignment to explicit
> casting when either will do. That way, the compiler is more likely to
> catch typos.
C++'s cast operators are be useful here --- for example, const_cast lets
you cast a variable from const foo* to a foo* without inadvertently
casting a foo* to a bar* if the type of the variable changes to const bar*.
The GDB people are slowly migrating their C-style codebase to C++, and
without turning it into a a GoF book appendix. Maybe we can do the same
someday.
next prev parent reply other threads:[~2016-12-05 17:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 23:16 EMACS_INT to EMACS_UINT Ravi Desai
2016-12-05 2:00 ` Paul Eggert
2016-12-05 13:56 ` Ravi Desai
2016-12-05 17:23 ` Paul Eggert
2016-12-05 17:47 ` Daniel Colascione [this message]
2016-12-05 18:38 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=866bb879-1089-7b1a-d483-0ca436cfcf29@dancol.org \
--to=dancol@dancol.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=ravi@ravidesai.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.