diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2025-12-26 06:34:32 +0100 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2025-12-26 07:04:53 +0100 |
| commit | f93437d8d54e26c64a88e4136e38f6a796d7fd8c (patch) | |
| tree | 6322d0168ae2bfbb49253c03a8b962041d13b7a8 /notes/250210-strict-mode.md | |
| parent | 69a9d657af41e52223e32e294f182400e0adb384 (diff) | |
Rename notes to add dates and fix index.
Diffstat (limited to 'notes/250210-strict-mode.md')
| -rw-r--r-- | notes/250210-strict-mode.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/notes/250210-strict-mode.md b/notes/250210-strict-mode.md new file mode 100644 index 0000000..5b99386 --- /dev/null +++ b/notes/250210-strict-mode.md @@ -0,0 +1,16 @@ +# Strict mode to disallow ignoring returned values + +This ties in to the last point. In Scheme, a non-tail expression in a +body can return an arbitrary number of values, which will be silently +ignored. + +This can lead to bugs, where a procedure actually returns some kind of +success or failure indicator (instead of raising an error) and the +programmer forgets to handle it. + +Though it may be too inefficient to enable globally, there should at +least be a mode of compilation that emits code which checks at every +single function return whether there are any values that are being +ignored, and raises an error if so. + +There would of course be a form to explicitly ignore values. |
