aboutsummaryrefslogtreecommitdiff
path: root/reasoning
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2024-12-01 05:45:45 -0500
committerTest_User <hax@andrewyu.org>2024-12-01 05:45:45 -0500
commitbd4ac9ad3da62bad5d48c3491257605939a90f74 (patch)
tree66175727bffc0b0932824b5225c0d35d649f30ab /reasoning
parentFix a typo (diff)
downloade2-spec-bd4ac9ad3da62bad5d48c3491257605939a90f74.tar.gz
e2-spec-bd4ac9ad3da62bad5d48c3491257605939a90f74.tar.zst
e2-spec-bd4ac9ad3da62bad5d48c3491257605939a90f74.zip
Add some seperate comments on nofail, and a place to put other such comments
Diffstat (limited to 'reasoning')
-rw-r--r--reasoning10
1 files changed, 10 insertions, 0 deletions
diff --git a/reasoning b/reasoning
new file mode 100644
index 0000000..a0d3f2a
--- /dev/null
+++ b/reasoning
@@ -0,0 +1,10 @@
+Some reasons for some stuff done here. Not going to be a part of the specification, just ideas for why.
+
+nofail:
+ If you can get into a situation where there's no way to free resources you no longer need, you have done something wrong.
+ If the language doesn't give you a way to do the above, the language has done something wrong.
+ free(), close(), and other such should be marked as `nofail`, so that you don't run out of stack space trying to call them, resulting in inability to free resources.
+
+ Good for situations where failing to call a function partway through is deemed (by the programmer) undesirable.
+
+ Also usable for times when you don't want to have to deal with failure.