[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mode names for C-like tree-sitter modes

From: Theodor Thornhill
Subject: Re: Mode names for C-like tree-sitter modes
Date: Tue, 15 Nov 2022 07:33:52 +0100

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 via email to

[Prev in Thread] Current Thread [Next in Thread]