-
Notifications
You must be signed in to change notification settings - Fork 2
Errors Chapter #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors Chapter #39
Conversation
| What we present here is not the only logically consistent approach to | ||
| errors, and our approach may clash with your instincts. It is the | ||
| result of optimizing for local reasoning and the ergonomics of | ||
| scalable software development, and the justifications for our choices | ||
| are interdependent. We hope you'll bear with us as we tie them all | ||
| together. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| What we present here is not the only logically consistent approach to | |
| errors, and our approach may clash with your instincts. It is the | |
| result of optimizing for local reasoning and the ergonomics of | |
| scalable software development, and the justifications for our choices | |
| are interdependent. We hope you'll bear with us as we tie them all | |
| together. |
It goes without saying that there are other logically consistent approaches to errors and the book's focus on ergonomics of scalable software development should be covered in the introduction. I sum, I don't see much value in this paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am skeptical of its value also.
| > - **Programming Error**, or **bug**: code contains an | ||
| > avoidable[^avoidable] mistake. For example, an `if` statement | ||
| > tests the logical inverse of the correct condition. | ||
| > | ||
| > - **Runtime error**: a function could not fulfill its postconditions | ||
| > even though its preconditions were satisfied. For example, | ||
| > writing a file might fail because the filesystem is full. | ||
|
|
||
| [^avoidable]: While bugs in general are inevitable, every *specific* | ||
| bug is avoidable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the "avoidable" qualification adds anything. Additionally, I fixed the tense of the examples to match
| > - **Programming Error**, or **bug**: code contains an | |
| > avoidable[^avoidable] mistake. For example, an `if` statement | |
| > tests the logical inverse of the correct condition. | |
| > | |
| > - **Runtime error**: a function could not fulfill its postconditions | |
| > even though its preconditions were satisfied. For example, | |
| > writing a file might fail because the filesystem is full. | |
| [^avoidable]: While bugs in general are inevitable, every *specific* | |
| bug is avoidable. | |
| > - **Programming Error**, or **bug**: code contains a | |
| > mistake. For example, an `if` statement | |
| > testing the logical inverse of the correct condition is a bug. | |
| > | |
| > - **Runtime error**: a function could not fulfill its postconditions | |
| > even though its preconditions were satisfied. For example, | |
| > writing a file might fail because the filesystem is full. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what I had in mind when I wrote that. It's not like me to use a term (and footnote it!) without having some meaning in mind. I think maybe I meant to say that runtime errors are not avoidable.
No description provided.