From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: EMACS_INT to EMACS_UINT Date: Mon, 5 Dec 2016 09:47:34 -0800 Message-ID: <866bb879-1089-7b1a-d483-0ca436cfcf29@dancol.org> References: <62201b47-8325-7ca3-b1c3-cc1360768b3f@ravidesai.com> <87e592da-d808-343a-4627-b3e9387346a6@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1480960096 3016 195.159.176.226 (5 Dec 2016 17:48:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2016 17:48:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 Cc: emacs-devel@gnu.org To: Paul Eggert , Ravi Desai Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 05 18:48:09 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDxN2-0007V7-Ql for ged-emacs-devel@m.gmane.org; Mon, 05 Dec 2016 18:48:09 +0100 Original-Received: from localhost ([::1]:43636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDxN1-0007Pm-IR for ged-emacs-devel@m.gmane.org; Mon, 05 Dec 2016 12:48:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDxMi-0007JZ-1X for emacs-devel@gnu.org; Mon, 05 Dec 2016 12:47:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDxMd-0005di-1X for emacs-devel@gnu.org; Mon, 05 Dec 2016 12:47:48 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:47838) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDxMc-0005bl-P1 for emacs-devel@gnu.org; Mon, 05 Dec 2016 12:47:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=ym6W2sKN54TrQ8zwai7jdeNDOfVmhc3EFU86ter7H14=; b=SgmJ3xYWgsBAdY/Q9n1C+7Nhs0rNgKd0/yZJ3717NdL0wp3CnbzE1IDWcA+c/8Z3Cyy08aiXveSN5YsSbN3AGR+GmjX5iMRojPwN6BZZsIl3TynAxyUmVlgINWXB2QAoEYTCY5oeqTc8FSRe49b8rNdlblCiIes2t3tCRd3lvQ2FnjAyUO3vrdbLThSUPUuuz3hJ9XuWwlm4yvkR+aEznwizezsZmIW5zfgamD3sCpWddBCtk9Ng0dGsliFba6oJca15G2/gtjS4Lz3FayWWeMdQ/zwCak8LWQepFvYxeqZcOR/BJx+kUDp5FvzpP3q64fPQxuToFmh8s4z7sEpQpA==; Original-Received: from c-73-140-245-253.hsd1.wa.comcast.net ([73.140.245.253] helo=[192.168.1.174]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cDxMV-0006UI-7e; Mon, 05 Dec 2016 09:47:35 -0800 In-Reply-To: <87e592da-d808-343a-4627-b3e9387346a6@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210077 Archived-At: 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.