From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: ptrdiff_t misuse Date: Fri, 06 Jul 2012 21:02:32 +0900 Message-ID: <87zk7d5c87.fsf@uwakimon.sk.tsukuba.ac.jp> References: <83lij66yq9.fsf@gnu.org> <4FEDB953.1010800@yandex.ru> <4FEEA720.2040405@cs.ucla.edu> <4FEEFBAB.6000404@cs.ucla.edu> <4FF3E1D6.1050103@cs.ucla.edu> <83bojv4h13.fsf@gnu.org> <4FF48920.501@cs.ucla.edu> <83vci22mr0.fsf@gnu.org> <83obnu2e8s.fsf@gnu.org> <4FF62C92.8090406@cs.ucla.edu> <83liix2xvp.fsf@gnu.org> <4FF69476.2070701@cs.ucla.edu> <83ipe12s6r.fsf@gnu.org> <8739556vjm.fsf@uwakimon.sk.tsukuba.ac.jp> <83bojt2lwm.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: dough.gmane.org 1341576181 25175 80.91.229.3 (6 Jul 2012 12:03:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2012 12:03:01 +0000 (UTC) Cc: eggert@cs.ucla.edu, dmantipov@yandex.ru, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 06 14:03:00 2012 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 1Sn7FS-0004bc-EI for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2012 14:02:58 +0200 Original-Received: from localhost ([::1]:37422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn7FR-0003NK-DR for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2012 08:02:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn7FJ-0003N8-Ey for emacs-devel@gnu.org; Fri, 06 Jul 2012 08:02:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sn7FH-0003te-NS for emacs-devel@gnu.org; Fri, 06 Jul 2012 08:02:49 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:43792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn7F7-0003s8-Te; Fri, 06 Jul 2012 08:02:38 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id EB9803FA0899; Fri, 6 Jul 2012 21:02:32 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id AFE471A355D; Fri, 6 Jul 2012 21:02:32 +0900 (JST) In-Reply-To: <83bojt2lwm.fsf@gnu.org> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta31) "ginger" b4715fcbe001 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.223 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:151450 Archived-At: Eli Zaretskii writes: > Not for someone who hacks Emacs sources. [EMACS_INT is] like > Lisp_Object: you get used to it very quickly and use it naturally > after that. Well, it isn't "like" Lisp_Object; it *is* Lisp_Object! How natural is *that*? > The type name actively resists that. The "ptr" part is one problem, > the "diff" part is another. None of them is related to the typical > usage of the positional values. Huh? The only way I can understand that is that people who have no clue about programming in C are programming in C! Don't you find that scary? > I expect them to see the common practice [using EMACS_POS] in Emacs > sources and follow suit. If not, they will get comments on their > code to that effect and learn fast enough. Ditto ptrdiff_t. > I didn't have you (or myself) in mind when I suggested EMACS_POS ;-) > I worry about newcomers, and would like to make their learning curve > in the matter to be as un-steep as possible. I worry about newcomers, and I would prefer (if I'm going to be reviewing) that they have a clue about programming in C if they're going to be programming in C. C, unlike Lisp, is the antithesis of a "safe" language. *Especially* when using pointers (which, in case you've forgotten ;-) is what C arrays -- including Emacs buffer and string data -- are! But I'm not going to be reviewing, most likely. I just wanted to point out that there is a school of thought opposed to yours.