From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps. Date: Sat, 1 Dec 2018 13:26:48 -0800 Organization: UCLA Computer Science Department Message-ID: <37f5c7fb-c1ce-e5b6-d242-5d9c2f3b3576@cs.ucla.edu> References: <20181129220552.GI12576@ACM> <9dde4ed7-8401-6022-a668-258d48bb7726@cs.ucla.edu> <20181130185503.GA16256@ACM> <20181130220218.GB16256@ACM> <138d56b7-53df-1ea5-377c-8502245f1b6b@cs.ucla.edu> <5C0239DA.4030907@gmx.at> <20181201124727.GC5102@ACM> <5C02962C.5040505@gmx.at> <20181201172127.GA29324@ACM> <7faee658-7ad0-4339-00e3-fef198a84121@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1543699510 13084 195.159.176.226 (1 Dec 2018 21:25:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Dec 2018 21:25:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: Michael Heerdegen , Emacs developers , martin rudalics , Stefan Monnier , Alan Mackenzie , Eli Zaretskii To: Yuri Khan , =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 01 22:25:05 2018 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 1gTCl6-0003Gg-OC for ged-emacs-devel@m.gmane.org; Sat, 01 Dec 2018 22:25:04 +0100 Original-Received: from localhost ([::1]:42583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTCnD-0001Ee-4Q for ged-emacs-devel@m.gmane.org; Sat, 01 Dec 2018 16:27:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTCn3-0001EK-NY for emacs-devel@gnu.org; Sat, 01 Dec 2018 16:27:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTCn2-0004Ga-U5 for emacs-devel@gnu.org; Sat, 01 Dec 2018 16:27:05 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58920) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gTCmx-0004D3-EX; Sat, 01 Dec 2018 16:26:59 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4D5141600C1; Sat, 1 Dec 2018 13:26:57 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id f4vjALqUuaIg; Sat, 1 Dec 2018 13:26:50 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 49FE916025A; Sat, 1 Dec 2018 13:26:49 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hRCyqmzzTjuZ; Sat, 1 Dec 2018 13:26:49 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 07D001600C1; Sat, 1 Dec 2018 13:26:49 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 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:231580 Archived-At: Yuri Khan wrote: > A macro that has a 'position-aware property on > it can be called directly on the position-annotated AST and expected > to use =E2=80=98eq-with-position-information=E2=80=99; while a legacy m= acro will be > called on a de-annotated AST, may use plain =E2=80=98eq=E2=80=99, and w= ill return a > similarly position-oblivious AST. Thanks, this is a good suggestion, perhaps the best idea I've heard so fa= r in=20 this thread. Here are a few more suggestions on top of it. 1. We could have (equal A B) ignore position information in A and B; this= would=20 make it more convenient for macros to use existing code based on 'equal',= and=20 it'd mean we wouldn't need a new predicate eq-with-position-information. = In one=20 form of this idea, when A and B are symbols then (equal A B) acts like=20 (string-equal (symbol-name A) (symbol-name B)), thus ignoring the distinc= tion=20 between interned and uninterned symbols. In another form of this idea, (e= qual A=20 B) merely ignores position information. 2. Instead of having a bulky notation for new, position-aware macros, we = could=20 use a syntax that's shorter or simpler than what we have now, to make new= -style=20 macros more appealing. For example, we could use "defmac" to define new-s= tyle=20 macros, and keep "defmacro" for old ones (we can say that the trailing "r= o"=20 stands for "region oblivious" :-). 3. If (2) is too drastic for you, we could have something like "(require=20 'position-macros)" (or some other syntax) that tells the byte-compiler th= at all=20 macros in this file are smart about positions; this would be more conveni= ent=20 than annotating each macro individually. Also, we could warn people that = this is=20 a transition approach, and that eventually the idea will be that position= -macros=20 will be the default and that if you want an old-style macro you need to=20 explicitly annotate it as old-style.