From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Mode names for C-like tree-sitter modes Date: Tue, 15 Nov 2022 07:33:52 +0100 Message-ID: <4EB0B88E-B497-47E4-A49B-8C1434EFC00B@thornhill.no> References: <3C23FEAC-6550-48BE-91A3-443B44717C40@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: rms@gnu.org, Richard Stallman , Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 15 07:35:40 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 1oupXn-0004OY-U6 for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Nov 2022 07:35:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oupWm-0001sG-8K; Tue, 15 Nov 2022 01:34:36 -0500 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 1oupWk-0001rz-BP for emacs-devel@gnu.org; Tue, 15 Nov 2022 01:34:34 -0500 Original-Received: from out0.migadu.com ([2001:41d0:2:267::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oupWf-0000RB-Ia; Tue, 15 Nov 2022 01:34:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1668494065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NNd/qtU8ehLwpQP2gGtb96YLv4lHQ9OFi5Vqf/oM6AA=; b=CndJz7Ymt9XGlz9qiiMfNQ6uhZR4lQiXa3uaboEbHtnYtdqU65cqkdap0apDgjYDEyiLpl js1LzyRXSrbpbeq+UDNZ3K46d/XDzVkFINduIo93NP/RicAz/IRe0GAMHj4r/SXKPIs4KR pbOCMY6+LYjegdqvkSEmor6NNGSXGk94jbjTFZu1KDswV2SJRRMoxBX24UMPAp3ti9S7Pn TpMeJe0bqhFprwT7MtIqLELQ2ZSdecHTxpYRTSDrhjQqJ0NXSh7rBdE7Sq/BkCxwR7fI+b MQdFrfJAlCqpLfSwG6PTATrWmtkIpK8ML3pzCFNVh49dzX59hwyT4ig1a6f2JA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=theo@thornhill.no; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299830 Archived-At: On 15 November 2022 05:17:10 CET, Richard Stallman wrote: >[[[ To any NSA and FBI agents reading my email: please consider ]]] >[[[ whether defending the US Constitution against all enemies, ]]] >[[[ foreign or domestic, requires you to follow Snowden's example=2E ]]] > > > I think it=E2=80=99s fair to make C, C++ and Java modes independent, > >Could you say that more clearly? What would be independent of what? > We now have several modes for the same language=2E The tree-sitter variant= of c-mode is c-ts-mode, with its own set of functionality=2E The Cc mode m= odes "own" the namespace which is the most intuitive to use - c-mode=2E We = have discussed how to deal with the naming, and all approaches has its ups = and downs=2E If we were to merge the codebase between the modes, and allowi= ng the name to be the same we would blend two very different approaches and= cause, in my opinion, unnecessary complication=2E Another downside is that= cc mode set a lot of before/after-hooks, caches etc that are simply _not_ = needed in the tree-sitter variant=2E Thus it makes sense not to blend them= =2E=20 Even though cc modes offer some functionality not present in the tree-sitt= er variant yet i think it's not the best idea to enable them side by side f= or performance reasons=2E Tree-sitter offers around an order of magnitude o= r more better performance, and losing some of that without very good reason= s would be a shame=2E So by independent we mean two modes for the C language that doesn't share = any code=2E Two files, no requires or inherits between=2E > since > > all the cc-mode options are invalidated when we use > > tree-sitter=2E > >Can you please describe the problem? > Most is hopefully described above, but I think a better word is "unnecessa= ry", not invalidated=2E I hope that's a little clearer?