by mikewarot · 2y ago · 0 comments
Ideally, it has to support a return stack, and a data stack.
I've seen ROM code that couldn't assume a return stack... not fun.
It would be really, REALLY nice if it could manage reference counted, counted, automatically allocated, strings, so that you could just use them without needing to allocate/free them, etc... just return a string like you return an integer.
Though that might count as too complex of a runtime for "low level", the idea is sometimes used in compilers to speed up and ergonomize basically everything that might deal with strings, which compilers do a lot.
How do you think automatically managed strings might work, so that there is as little hidden code and costs as possible, but still decently ergonomic for your taste?
Would you consider automatic strings good enough if restricted to (a) statically known length, (b) statically known buffer size, or is it only worth it when they can be fully dynamic?