From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: feature/tree-sitter: Where to Put C/C++ Stuff Date: Tue, 01 Nov 2022 11:09:39 -0400 Message-ID: References: <83pme7cf23.fsf@gnu.org> <83cza6db7e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20930"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: theo@thornhill.no, emacs-devel@gnu.org, dev@rjt.dev To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 01 18:15:14 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1opur1-0005Bb-G2 for ged-emacs-devel@m.gmane-mx.org; Tue, 01 Nov 2022 18:15:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opstl-0000V5-Sw; Tue, 01 Nov 2022 11:09:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opsth-0000TZ-B6 for emacs-devel@gnu.org; Tue, 01 Nov 2022 11:09:50 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opstd-0000Q1-Ob; Tue, 01 Nov 2022 11:09:48 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9F955100197; Tue, 1 Nov 2022 11:09:42 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EB2CF10010D; Tue, 1 Nov 2022 11:09:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1667315381; bh=0NkKIrRao0Bd7Ev9ZfU0gnLi3EU4GHEtkZ1Un+Pqj1g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KiKRZM6t92oo8y9++y5f/3rCEs1OHWIIr96H39fpY9Md4cyEstnDVs69D6wDfDnje 6yIJQjkNBjpw5swTy4ox7QtTq7lMrUR5qE/XmkG9IqeEirZCWqREndzfwS0Ywuci7o TCiCNAStHtgF7OcTXj6qstzfcfJc3XP8+CPLooocvlaM/QLtuqwrHLyIfg5G4UULt1 KNi9dNsPT8LvOBee5t5JrjpNqbNZgeH2zca/pGehWAj1jyQmwYkqtepRQLOu+pzAUp 4SVVxeQiXL8bATe8MC9wJxG6nbBxzCzs6ZRI9kVyqVMpocfqWQQqFQg7gukUFF1h8A pU40mnlfoyqjQ== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id ACEC7120FD1; Tue, 1 Nov 2022 11:09:40 -0400 (EDT) In-Reply-To: <83cza6db7e.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Nov 2022 16:02:45 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298946 Archived-At: > Sorry for being blunt, but you've presented a plan for Emacs 32 if > not 42. Huh? What makes you think that? On the contrary it's a plan that lets us get quickly a working tree-sitter-based C-mode. Not one that's a strict superset of CC-mode's `c-mode`, but a quite decent `c-mode` nevertheless. > Bottom line: I don't see how we could make a "revolution" the size you > are envisioning in such a short time. It's not at all a revolution. It's a very smooth path that breaks nothing and lets us move progressively. It's a mini "revolution" maybe for users who will have to choose between two different flavors of `c-mode`, each one with its current strengths and downsides, but that's the cost to pay for a much smoother job on the implementation. > Not unless you somehow can summon a team of talented and motivated > individuals to work on it starting today. The only practical way > I see is by _evolution_, gradually replacing CC Mode's features with > tree-sitter supported ones where that makes sense, and at first as > opt-in. And yes, this means no "breaking out of CC-mode", at least > not as part of this particular effort: it simply is too much, too high > a bar to jump. It could well enough kill the effort, for all > practical purposes. Slowly evolving CC-mode itself to use tree-sitter is something I can't even begin to imagine how to do. That's what I would expect to take years :-) > Of course, I'd be happy to be proven wrong, and be dazzled by a > full-fledged, backward-compatible C/C++ mode based on tree-sitter, > with all of the stuff you mentioned on top of that, within the month. I don't foresee "all of the stuff" to be done immediately, no. [ Tho I do think the filling code at least can be extracted from CC-mode within a month (or at least, an important subset of it). ] Which is why users will have to choose (and we'll stick to CC-mode by default, of course). Stefan