10
LuxARTS
7y

When the compiler throw a lot of errors and was a stupid ; missing...

Comments
  • 0
    It is a failure as a program in general. Compilers should be designed so that they take the context of the error. If it's a syntactical error it should reported on the first instance itself. There's no need of verbosely reporting errors which were caused by this error.
  • 0
    And yes Syntax highlighting is a blessing :)
  • 4
    @Arindam It depends on the language in some part.

    C++ for example with macros and templates and more is not to easy to parse since a macro can “rewrite” the code from something invalid to something valid and the missing ; could possibly be a missing macro.

    This is where context highlighting shines since you would realize that the macro has the wrong color.

    Other languages with less flexible syntax gives the compiler a better chance to give a good error message and as far as I have heard Mozillas rust excels at this.
Add Comment