2 ms·
With this mindset I feel like you would also think bumping a C++ compiler toolchain version is impossible due to all the different changes to code generation th
by charcircuit 11mo ago
With this mindset I feel like you would also think bumping a C++ compiler toolchain version is impossible due to all the different changes to code generation that could happen. This is already done today and has similar issues where technically all the code can be affected, but it's not reviewed via a process of manually reading every line.
- monocasa 11mo agoThere's a nearly incalculable difference between bumping a compiler version and rewriting it in a different language.
- charcircuit 11mo agoA C++ compiler translates C++ to an assembly. This project would translate C++ to another language. It's not that different of a concept.
- monocasa 11mo agoA compiler isn't using a statistical model of language more complex than anyone could understand with a lifetime of study to do its translation, adheres to a standard for that translation, and if you're important enough (and Microsoft internal teams are for MSVC), you get heads up on what specifically is changing so you know where to look for issues. This is "lets put our postgres database on blockchain because I think blockchain is cool" level of crap you see in peak bubble.
- overgard 11mo agoCompilers are deterministic.
- dagmx 11mo agoIt’s significantly more straight forward to go from a higher level to a lower level representation than it is to go between different high level representations. That’s not to trivialize what a compiler does, but it’s effectively going from a complex form to its building blocks while maintaining semantics. Changing high level languages introduces fundamentally different semantics. Both can decompose to the same general building blocks, but you can’t necessarily compose them the same way. At the simplest example, a compiler backend (the part you’re describing) can’t reason about data access rules. That is the domain of the language’s compiler frontend and a fundamental difference between C++ and Rust that can’t just be directly derived.
- Krssst 11mo agoThere is a C++ standard that everyone writing C++ code follows and newer version are usually compatible with one another regardless of toolchain version. Behavior of the toolchain should not change. Worst case you can use deterministic, reliable tools to automatically detect problematic locations if there really is a behavior change. (compiler warnings/errors for example) AI code generation is not deterministic and has no guarantee of behavior, thus requires review unless incorrect code is acceptable.
- charcircuit 11mo ago>AI code generation is not deterministic You don't have to use AI code generation to be what is generating the code or you could require some kind of proof of equivalence to verify the code that was generated.