emacs-devel
[Top][All Lists]
Advanced

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

Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitte


From: Ergus
Subject: Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter
Date: Wed, 28 Jul 2021 14:36:12 +0200

On Wed, Jul 28, 2021 at 07:43:03PM +0800, Andrei Kuznetsov wrote:
Stephen Leake <stephen_leake@stephe-leake.org> writes:

The tree-sitter runtime, that Emacs would link with, it implemented in
C, partly for this reason. It would be compiled with whatever Emacs is
compiled with, or the system compiler.

Interesting.  I was not aware of that.

Some of the tree-sitter development tools are implemented in Rust; you
only need Rust if you are developing/fixing a grammar for a language.

If I understand this correctly, it means one would require the Rust
toolchain to support new languages in tree-sitter, or to improve
existing support.  Would that really fit Emacs?  I think many people
might not be comfortable learning such a large language and toolchain to
develop editing tools for Emacs.

Furthermore, is there any concrete reason this could not be done in
Lisp?

I will say:
1) Performance (discussed in the previous thread):
2) Not reinvent the wheel.

Tree-sitter is very well maintained, optimized and with very specialized
algorithms; and we lack manpower to duplicate all that effort; and
implementing it in lisp won't really worth the efforts and may be
unmaintainable and slow.

Tree-sitter hopefully won't get abandoned in the future because many
editors use it right now (including neovim) and the community is very
dynamic.

Another advantage is that with tree-sitter as a back-end we could
officially (almost for free) support many languages that are currently
unsupported officially and may require a lot of effort to support them
in a minimal way (or currently supported in some inconsistent way, with
incoherent bindings/colors/indentations. Ex: Typescripts, Rust, Julia)

Note: Somehow I sent a reply earlier, and not a follow-up.  I apologize
for the duplicate.




reply via email to

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