unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Theodor Thornhill <theo@thornhill.no>
To: rms@gnu.org, Richard Stallman <rms@gnu.org>, Yuan Fu <casouri@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Mode names for C-like tree-sitter modes
Date: Tue, 15 Nov 2022 07:33:52 +0100	[thread overview]
Message-ID: <4EB0B88E-B497-47E4-A49B-8C1434EFC00B@thornhill.no> (raw)
In-Reply-To: <E1ounNm-0004ti-Qm@fencepost.gnu.org>



On 15 November 2022 05:17:10 CET, Richard Stallman <rms@gnu.org> 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. ]]]
>
>  > I think it’s 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. The tree-sitter variant of c-mode is c-ts-mode, with its own set of functionality. The Cc mode modes "own" the namespace which is the most intuitive to use - c-mode. We have discussed how to deal with the naming, and all approaches has its ups and downs. If we were to merge the codebase between the modes, and allowing the name to be the same we would blend two very different approaches and cause, in my opinion, unnecessary complication. 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. Thus it makes sense not to blend them. 

Even though cc modes offer some functionality not present in the tree-sitter variant yet i think it's not the best idea to enable them side by side for performance reasons. Tree-sitter offers around an order of magnitude or more better performance, and losing some of that without very good reasons would be a shame.

So by independent we mean two modes for the C language that doesn't share any code. Two files, no requires or inherits between.

>                                                                 since
>  > all the cc-mode options are invalidated when we use
>  > tree-sitter.
>
>Can you please describe the problem?
>

Most is hopefully described above, but I think a better word is "unnecessary", not invalidated.

I hope that's a little clearer?



      reply	other threads:[~2022-11-15  6:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14  1:16 Mode names for C-like tree-sitter modes Yuan Fu
2022-11-14  6:34 ` Theodor Thornhill
2022-11-14  9:09   ` Yuan Fu
2022-11-14  9:49     ` Theodor Thornhill
2022-11-14 10:07       ` Theodor Thornhill
2022-11-14 10:17     ` Simen Heggestøyl
2022-11-15  2:49     ` Stefan Monnier
2022-11-14 19:04 ` Eli Zaretskii
2022-11-15  4:17 ` Richard Stallman
2022-11-15  6:33   ` Theodor Thornhill [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB0B88E-B497-47E4-A49B-8C1434EFC00B@thornhill.no \
    --to=theo@thornhill.no \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).