Open jkotlinski opened 1 year ago
On more thought. Maybe "LOAD" is not that great, it is normally used for Block loading, so there is some risk of conflict or confusion.
SuperForth64 uses "LOADRAM" and "SAVENAME + SAVE".
ultraFORTH83 uses "BLOAD"/"BSAVE".
More investigation to follow...
Something Unix-ish, like maybe READ WRITE. Jonesforth was no help.
I like LOAD-FILE/SAVE-FILE best, because this naming is similar to Forth Standard words (OPEN-FILE, CLOSE-FILE, ...) but it is unclear if it is worth a breaking change...
Maybe they should be hidden and we can offer LOAD and SAVE in io.fs?
Something Unix-ish, like maybe READ WRITE.
If I understand correctly, unlike standard read-file
and write-file
, loadb
and saveb
do the whole file instead of following a seek pointer (Edit: so these names are probably not the best).
Does the "binary data" mentioned in the manual mean "PRG file" (another thing I don't know about)? If so how about load-prg
and save-prg
?
I think "binary data" is nonsense, you are right in that it reads whole .prg files. Maybe load-prg/save-prg is good.
Another gripe about saveb
. The range is given as start address + end address. In Forth, it is nearly always start address + length.
Yet another confusing thing... loadb takes first filename, then data address. saveb takes first data address, then filename. It is set up for mistakes.
v
Likes things a certain way.
Back in 2009, LOADB/SAVEB got their names because "LOAD" was already in use.
Since "LOAD" is now unused, I think it would make sense to rename "LOADB"/"SAVEB" to simply "LOAD"/"SAVE" (or, possibly, "LOAD-FILE"/"SAVE-FILE").