Changes

Compiler

374 bytes added, 19:40, April 2, 2012
errors can be very expensive
==Dealing with errors==
Almost all non-trivial programs contain errors. Detecting and fixing all errors is very expensive and time-consuming, so a balance has to be struck between the potential effect of certain errors (e.g. could they be life-threatening?) and the cost of fixing them. The design of a programming language may also affect the likelihood of certain types of errors and the difficulty or otherwise of fixing them.
 
Gerald Weinberg reported in 1983 that the three most expensive programming errors of all time each cost hundreds of millions of dollars and that each was a one-line, coding-level mistake.<ref>{{cite web
| url = http://www.stevemcconnell.com/ieeesoftware/bp01.htm
| title = Who Cares About Software Construction?
| author = Steve McConnell
| accessdate = 2012-04-02}}</ref>
During translation compilers can usually detect all errors due to lexical or syntactical mistakes (spelling and grammar); they may also be able to detect a few simple semantic errors (meaning). Even when a compiler does detect and report an error, all it can do is report what the error is and where it was detected; unfortunately the point of detection can be in some cases be many lines away from the actual source of the error; also it may be difficult to explain the error in terms that the programmer can understand.
SkipCaptcha
265
edits