10
atheist
143d

Coming back to c++ after far too long in python...

Compiler: "Do you even know what a semicolon is?!"

Comments
  • 1
    "oh. Sorry. I thought I had enabled the -ignore-syntactial-errors option"
  • 0
    @asgs how can you ignore syntactical errors? 😂
  • 3
    @Lensflare there will come a version of the LLVM backend which will incorporate an LLM that will fix the code and go as we compile

    "Semicolon expected at the end of line #5 but missing. Adding it.
    Detected an assignment operator in an if block. Updating it to ==.
    Found stdio include directive. Replacing it with iostream and refactoring the relevant usages

    Rerun the build with -disable-auto-fixes if you want me to drill your ass with a myriad of bugs buried in your code"
  • 1
    @asgs ok but that’s not ignoring. It’s correcting.
  • 2
    @asgs Such a feature has to be done carefully. After a successful compilation, the compiler must clearly show what changes have been made to fix compilation errors, if any.

    Adding missing semicolons may be alright but things like changing assignment operators to == in if (which is not an error in the first place) and fixing other errors may not always give the intended result without knowing the intention of the code writing human. It may even lead to hard to catch bugs later on if the code writing human does not properly see and understand what the compiler automatically “fixed”.

    Then again, a model will come along which will write machine code, if such a thing still exists.
  • 1
    @-red absolutely. We will see a lot of versions before we get to the autopilot mode
  • 1
    Finally a decent post in this place
Add Comment