From 3bfbe688f5a62e29835c7d3c4f282e7fff57949d Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 18 Jan 2024 17:47:12 +0000 Subject: Rename --- .../chapter5_advanced_features/lesson03_panic/text.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/content/chapter5_advanced_features/lesson03_panic/text.html (limited to 'src/content/chapter5_advanced_features/lesson03_panic/text.html') diff --git a/src/content/chapter5_advanced_features/lesson03_panic/text.html b/src/content/chapter5_advanced_features/lesson03_panic/text.html new file mode 100644 index 0000000..843a65b --- /dev/null +++ b/src/content/chapter5_advanced_features/lesson03_panic/text.html @@ -0,0 +1,11 @@ +

+ The panic keyword is similar to todo keyword, but it + is used to crash the program when the program has reached a point that should + never be reached. +

+

+ This keyword should almost never be used! It may be useful in initial + prototypes and scripts, but its use in a library or production application is + a sign that the design could be improved. With well designed types the type + system can typically be used to make these invalid states unrepresentable. +

-- cgit v1.2.3