Comment by VorpalWay

2 days ago

Not the same level of sophistication, but ast-grep allows this for far more languages, since it is based on the tree-sitter parser library. I have used it with some success on C++. Of course it only works on the AST level, and C++ famously need types for correct parsing, so it sometimes fall short (also on macros).

https://ast-grep.github.io/

I am working on AST level revision control and yes, macros make life difficult. On the other hand, merging/diffing on the AST level is fun.

https://replicated.wiki/blog/partI.html

  • I found that font extremely hard to read for some reason (on my phone). So I gave up. Maybe due to you using a monospace font for non-code?

    But I believe smalltalk represented code as functions in a database somehow, so maybe that is worth looking at.

    • That is JetBrains Mono. HN is using Verdana, I believe, that one is recommended as the most usable common font.

      Smalltalk is ancient. I would say, Unison is an interesting recent experiment, and there are others. But, I am interested in universal revision control, any language.