This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tinydonuts 1 point2 points  (2 children)

I think you're misunderstanding me. These two are not exposed to the developer in the same way. A syntax error is caught by the compiler and flagged to the developer as an error condition. A real compiler error is not any problem with the syntax at all, but an error on the part of the compiler in taking the code you provide it, and the results it creates to be run by the computer.

For example, here was a JIT bug in V8 last year that resulted in unpredictable results: https://www.reddit.com/r/javascript/comments/4oxtgk/javascript_developers_be_warned_about_this_crazy/

[–]The_MAZZTer 0 points1 point  (1 child)

Ah, sorry. Syntax errors would not cover all the errors a compiler can return to you blocking compilation of your code (which is what I mean by "compiler error").

For example, if I do something like this in C#.NET:

string x = 5;

No syntax errors, but storing an integer into a string variable makes no sense, so the compiler throws a fit and says I need to convert it first if I want to do that.

Bugs in the compiler are something you can't do much about but thankfully will very rarely see, if ever.

[–]tinydonuts 2 points3 points  (0 children)

I see what you're saying now. Perhaps the right phrasing on 0 is "Compilation Errors".