From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jarek Czekalski Newsgroups: gmane.emacs.devel Subject: Re: Booleans Date: Mon, 16 Dec 2013 08:39:14 +0100 Message-ID: <52AEAE22.1020702@poczta.onet.pl> References: <83vbyqdncv.fsf@gnu.org> <52AE3556.6080704@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1387179565 16372 80.91.229.3 (16 Dec 2013 07:39:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Dec 2013 07:39:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 08:39:32 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VsSm3-0000hF-Ih for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 08:39:31 +0100 Original-Received: from localhost ([::1]:54222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsSm2-00023c-QZ for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2013 02:39:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsSlu-00022Z-Qb for emacs-devel@gnu.org; Mon, 16 Dec 2013 02:39:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsSlp-0001dz-Jk for emacs-devel@gnu.org; Mon, 16 Dec 2013 02:39:22 -0500 Original-Received: from smtpo11.poczta.onet.pl ([213.180.142.142]:56536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsSlp-0001dB-8t for emacs-devel@gnu.org; Mon, 16 Dec 2013 02:39:17 -0500 Original-Received: from [192.168.17.9] (cj.e-siemianowice.pl [95.215.234.30]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jarekczek@poczta.onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 3djZ9v01lLz9ttWg for ; Mon, 16 Dec 2013 08:39:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poczta.onet.pl; s=2011; t=1387179555; bh=goxvu9rx9zQ93KvMEHfJVwLWM5QrDfntSph1KzyBWJs=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=hd+90KcvA51Yym0DdM3QCgKns84puu4pHzfvDvvi2zUmmRLXB7cSemtAy7xi8N4I6 OhM6vyh6s9UFwcU6NnTfkKYZXfUKdl0APGDMwE5FvTv0uoyQbF5Bcs77sSliJdV0us ULVZIklD5iVO9moxUD+Du7N6idlYh3PejcRb1El4= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 In-Reply-To: <52AE3556.6080704@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.180.142.142 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166462 Archived-At: W dniu 2013-12-16 00:03, Paul Eggert pisze: > I did it primarily because Stefan suggested that I > do so, while changing int to bool etc. Was it a private discussion? I can't remember seeing that. I hope it was not, see "Avoid private discussions". [1] >> It would be an odd style to use '0' for false >> preprocessor expressions, while using 'false' for false >> expressions everywhere else. For a c programmer while (1) is extremely readable and obvious, and short. While we are in c and not in Python or Lisp, I would follow the c convention. In places like this one, where introducing bool gives no benefits. > >should have been a separate commit, as > >it is not a mechanical replacement, far from it. > It was a judgment call. Perhaps I should have separated it > out, though it's no big deal. It was a case of an int value > being used as a boolean with values 0 and -1. I think it is a deal worth a while. It's very hard to locate a change in a commit that is 221k long. Such long commits should be limited to mechanical changes. Putting several different changes in such a long commit makes it impossible to review. Now it's time for the most important question: do you want your revisions to be reviewed? See "Practice Conspicuous Code Review" [2]. Why this single change should be a separate commit? I would justify it being a change of the interface of an internal library. An advanced Emacs user may have more calls to this internal api. Would he expect that the interface was changed seeing a label "Use bool for boolean" in the commit message? I could even give reasons for not changing at all this interface, but maybe it's not worth arguing. Thanks Jarek [1] http://producingoss.com/en/producingoss.html#avoid-private-discussions [2] http://producingoss.com/en/producingoss.html#code-review