From 7dc326fb8c1dfe4a24f6823d9a1e0a3a2dc8e698 Mon Sep 17 00:00:00 2001 From: Ákos Kőrösi Date: Sun, 24 May 2026 23:15:49 +0200 Subject: update notes --- docs/DEVNOTES.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/DEVNOTES.md b/docs/DEVNOTES.md index 3333943..3413f00 100644 --- a/docs/DEVNOTES.md +++ b/docs/DEVNOTES.md @@ -2,11 +2,13 @@ # TODO ## CURRENT -- arithmetic -- $(cmd) expansion +- `~` expansion +- implement dealiasing conditions correctly +- heap deallocation -## NEXT +## NEXT TOPICS - fd-based redirects +- arithmetic ## LATER - proper error handling @@ -14,4 +16,20 @@ - extensibility hooks and exposed constant - freeing allocs +## EVEN LATER +- globbing + ## BUGS + + +# IMPLEMENTATION NOTES +(for some of the above) + +## Proper error handling +There should be a global error struct with a string buffer, and functions would be adding context to it. +We could define a Maybe-like _Result_ "generic" with a macro and wrap the return type of most functions in it, and add the checks for this around calls. + +We also have to add error checks around stuff that can go wrong. Particularly around: +- opening files, opening pipes, managing fd-s +- malloc/free stuff +- array accesses (should be bounds checked) -- cgit v1.2.3