Context
This Topic is about the following video https://youtu.be/pRJ6H967sd4
I just wanted to make some feedbacks on it and a YouTube comment was not sufficient.
Analyzer vs Representer
Should the concepts be extracted by the analyzer or the representer
Analyzer: Makes sense as it analyzes
Representer: Should only represent to find similar solutions
Note: Maybe we should merge both the analyzer and the representer into one
In my opinion, a representer is rather straightforward to do if there is a library that can gets you the Abstraxt Syntax Tree (AST) of the code, hence adding the smartness to the representer may not be that easy. In the other hand the analyzer should already be analyzing the code and have more context on it which may help on implementing this concept extraction.
A more general approach
It looks like the ultimate goal is to be able to share a normalized representation between 2 or more languages. In fact doing so would help to share feedbacks accross the whole site. While the transliteration to a singular language is not possible (I guess) maybe we could use tools such as Tree-sitter in order to get a normalized AST across all languages.
Tree-sitter already supports a lot of languages, but for example it does not support Ballerina so this won’t directly work for all languages.
Disclaimer: I contributed to GitHub - exercism/php-representer