Re:The Programmer's Brain
by adamgordonbell on Monday June 17, 2024 @12:52PM
(#40707888)
My understanding is they can do AST based translation and then use natural language translation to change variables.
So they can switch the language, but its limited to the quality of natural language translation of variable names.
The RTL langs and the different numbering system, from our interview, seemed like the hardest parts she had to tackle.
I wonder how such a translation system would handle variables like i/j counters. If the target language is anything with a non-latin writing system then I can't imagine what you would substitute. I'm sure there's converse examples too, of single-character variables that have no translation to English.
Similarly, I wonder how one handles non-obvious shorthand like "rsp"
Looking at it more, Hedy looks like it solves the latter problem reducing the barrier to entry. I wonder if something like this could be used to also keep the benefit of a common language. It looks like it allows you to choose at the beginning what language to use for authoring code, but could you use it's mapping of keywords across languages to allow a reader to choose the language they view the code in? Would that be sufficient? Maybe not because you still have variable names, function names, etc. that wouldn't have such a mapping. But I wonder how far that kind of auto-translation would get you. And how effective AI-based translation of the remainder would be, especially if paired with some sort of AST-based tooling that helps the AI to use consistent naming for the same symbols, etc. Interesting!