Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
fb7839d
Begin Errors.
Sep 17, 2025
252e110
Errors WIP
Sep 23, 2025
661e6cf
WIP
Sep 30, 2025
81f3f44
WIP
Sep 30, 2025
919822e
Errors WIP
Nov 5, 2025
2ad2aef
Recoverd talk notes
Nov 12, 2025
d105bc6
Merge remote-tracking branch 'origin/main' into errors
Nov 13, 2025
0a366a8
WIP
Nov 14, 2025
aed127c
More WIP
Dec 1, 2025
ab2f6b5
WIPPITY WIP WIP WOW
Dec 2, 2025
333b81e
X
Dec 11, 2025
32a543b
Progress
Dec 15, 2025
0dbc6b3
End section on bugs.
Dec 17, 2025
1904312
Fix levels
Dec 17, 2025
1c53ffa
Whitespace
Dec 17, 2025
797f128
Bugfix
Dec 17, 2025
85c9686
X
Dec 18, 2025
21feed2
Merge origin/errors2 into errors (using imerge)
Dec 18, 2025
cc1b758
Checkpoint
Dec 18, 2025
4f5d481
Remove treatment of emergency shutdown measures.
Dec 18, 2025
642a4e5
Preface caveat
Dec 18, 2025
bb19270
Checkpoint
Dec 18, 2025
ce7e1e6
Checkpoint
Dec 18, 2025
cf5a223
checkpt
Dec 23, 2025
91c80db
Tweekz
Jan 4, 2026
cca0e8a
Edits
Jan 6, 2026
66303f0
Checkpoindexter
Jan 7, 2026
a3abe80
Copy-pasta
Jan 7, 2026
b7b3d42
X
Dec 18, 2025
1ab7851
Simplicity!
Jan 7, 2026
79c426c
Examples and language cleanup
Jan 7, 2026
f52541e
Progress on throw vs. Result
Jan 7, 2026
15c810d
Progress.
Jan 10, 2026
896dc1d
Terminology + massaging
Jan 22, 2026
842b853
Onward
Jan 22, 2026
9fb694f
Finish 1st draft
Jan 24, 2026
8cbdf6a
typo
Jan 29, 2026
8147eb3
Consistent terminology.
Jan 29, 2026
25249da
Intro tweaks
Jan 26, 2026
9ab6665
Conclusion + fleshing out.
Jan 27, 2026
d8c1a43
Remove flotsam
Jan 27, 2026
08fa18e
Edits based on David Sankel's feedback.
Jan 29, 2026
e7e7879
Let it flow.
Jan 29, 2026
dffbada
typo
Feb 2, 2026
1eaf05e
Better wording from Ambrus
Feb 2, 2026
21127c5
Fix logic error
Feb 2, 2026
f7e3bfe
Take Ambrus' suggestion to mention using type information
Feb 3, 2026
519fd45
typo
Feb 6, 2026
e55fc3d
Apply suggestions from code review
Feb 6, 2026
bcdd6bd
Fix markdown-o's
Feb 11, 2026
b9e92de
We know it's not the earliest!
Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions better-code/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

- [Introduction](./chapter-1-introduction.md)
- [Contracts](./chapter-2-contracts.md)
- [Errors](./chapter-3-errors.md)
7 changes: 4 additions & 3 deletions better-code/src/chapter-2-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ It's an invariant of your program that a manager ID can't just be
random; it has to identify an employee that's in the database—that's
part of what it means for the program to be in a good state, and all
through the program you have code to ensure that invariant is upheld.

#### Encapsulating invariants

It would be a good idea to identify and document that whole-program
Expand Down Expand Up @@ -814,9 +815,9 @@ the array has an element. OK, so what about postconditions?

The postconditions are the effects of the method plus any returned
result. If the preconditions are met, but the postconditions are not,
and the function does not report an error, we'd say the method has a
bug. The bug could be in the documentation of course, *which is a
part of the method*.
and the function does not report a runtime error, we'd say the method
has a bug. The bug could be in the documentation of course, *which is
a part of the method*.

```swift
/// Removes and returns the last element.
Expand Down
Loading