Define a primitive data type: Difference between revisions

Line 240:
 
*)</lang>
 
The compiler’s messages are cryptic, but this problem could be overcome with devoted work on the compiler. (It is, after all, copylefted software and can be forked.)
 
There is a more serious downside. It is stated in the Ada section that the compiler is smart enough to know when to leave out bounds checks. In contrast, the ATS compiler will ''reject'' the program, unless it ''knows'' it can ‘leave out bounds checks’.
 
On the other hand, ''if you have no proof'' that a value is with the bounds 1..10, you can bypass the assignment, possibly by terminating the program. In other words, you ''can'' insert a bounds check. It is often done. But the compiler will tell you when you need to do it, and the bounds checks are likely to be sparse enough that you can leave them in when delivering the program.
 
=={{header|C sharp|C#}}==
1,448

edits