I'm going through and changing a lot of FUNCTION uses to FUNC + LET. The long term goal will be to eliminate the locals-gathering functionality...and you either use LET/USE or you go explicit with <local>
in the function spec.
I came across this:
size-as-binary: enbin [be + 8] length of embedding
append executable size-as-binary
This was the only use of the variable. Changing it to a LET works, but it's kind of a waste:
let size-as-binary: enbin [be + 8] length of embedding
append executable size-as-binary
LET's assignment form does run the right hand side...because the LET word itself vaporizes, so it's like the bound new SET-WORD! just runs as normal:
append executable let size-as-binary: enbin [be + 8] length of embedding
But a LET isn't really necessary here. I had a weird thought, what if a TAG! or ISSUE! or something was used in a way that was "obviously" throwing it away?
append executable (<size-as-binary> enbin [be + 8] length of embedding)
Maybe a little confusing. But it saves on a variable declaration.
A comment is zero overhead, so I'm doing that...
append executable enbin [be + 8] length of embedding ; size of binary
But I just thought the idea of a deliberately discarded leading value was kind of interesting.