tree-sitter-python VS tree-sitter-go

Compare tree-sitter-python vs tree-sitter-go and see what are their differences.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
tree-sitter-python tree-sitter-go
5 4
383 318
3.4% 2.5%
7.7 7.4
11 days ago 11 days ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

tree-sitter-python

Posts with mentions or reviews of tree-sitter-python. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-19.

tree-sitter-go

Posts with mentions or reviews of tree-sitter-go. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-11-09.
  • Mergiraf: a syntax-aware merge driver for Git
    5 projects | news.ycombinator.com | 9 Nov 2024
    I don't think that different algorithms are better for merging or diffing. In both cases, the first step is to match identical nodes, and the quality of the final result depends heavily on this step. The main problem with GumTree is that it is a greedy algorithm. One incorrectly matched node can completely screw up the rest of the matches. A typical example we encountered was adding a decorator to a function in Python. When other functions with the same decorator followed, the algorithm would often map the newly added decorator to an existing decorator, causing all other decorator mappings to be "off-by-one". GumTree has a tendency to come up with more changes than there actually are.

    We try to really get the diff quality nailed down before going after merges. We don't have merge functionallity in SemanticDiff yet.

    The main issue we have with tree-sitter is that the grammars are often written from scratch and not based on the upstream grammar definition. Sometimes they only cover the most likely cases which can lead to parsing errors or incorrectly parsed code. When you encounter parsing errors it can be difficult to fix them, because the upstream grammar is structured completely different. To give you an example, try to compare the tree-sitter Go grammar for types [1] with the upstream grammar [2]. It is similar but the way the rules are structured is somewhat inverted.

    We use separate executables for the parsers (this also helps to secure them using seccomp on Linux), and they all use the same JSON schema for their output. This allows us to write the parser executable in the most appropriate language for the target language. Building all them statically and cross-platform for our VS Code extension isn't easy though ;)

    [1]: https://github.com/tree-sitter/tree-sitter-go/blob/master/gr...

  • Looking for EBNF / Antlr / yacc for Go with generics
    2 projects | /r/golang | 3 Jan 2023
    Might the tree-sitter grammar at https://github.com/tree-sitter/tree-sitter-go help at all?
  • Building tree-sitter languages for Emacs
    20 projects | /r/emacs | 30 Dec 2022
  • Tree-sitter: an incremental parsing system for programming tools
    24 projects | news.ycombinator.com | 22 Feb 2021
    Worth calling out that the syntax highlighting support is used to highlight several languages in github.com. (Linguist is still used for the long tail of languages, but we plan to migrate more and more over to tree-sitter-based highlighting over time.)

    The query language is also what's used to drive the fuzzy/ctags-like Code Navigation feature. Both of those are powered by tree-sitter query files defined in each language's repo, like these for Go: https://github.com/tree-sitter/tree-sitter-go/tree/master/qu...

What are some alternatives?

When comparing tree-sitter-python and tree-sitter-go you can also consider the following projects:

tree-sitter-rust - Rust grammar for tree-sitter

elisp-tree-sitter - Emacs Lisp bindings for tree-sitter

lsp-mode - Emacs client/library for the Language Server Protocol

Moose - MOOSE - Platform for software and data analysis.

tree-sitter-c-sharp - C# Grammar for tree-sitter

tree-sitter-haskell - Haskell grammar for tree-sitter.

tree-sitter-typescript - TypeScript grammar for tree-sitter

tree-sitter - An incremental parsing system for programming tools

tree-sitter-vue - Vue grammar for tree-sitter

nvim-treesitter - Nvim Treesitter configurations and abstraction layer

tree-sitter-zig - Tree-sitter package for the Zig programming language

tree-sitter-kotlin - Kotlin grammar for Tree-sitter

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured

Did you konow that JavaScript is
the 3rd most popular programming language
based on number of metions?