Something @rgchris had done that I liked was to use TAG! in module headers as a sort of TBD when the script header contained a configuration for that script.
It cued you what you needed to edit, and the script could deliver you errors telling you if you didn't configure it one way or another:
Rebol [
Title: "My Cool Script"
Description: {
Edit the variable below to set the directory.
}
Directory: <your-path-here>
]
The code looks to see if the directory is a FILE! or a TAG!. If it's a tag, it errors. But the erroring has to be done manually.
This made me wonder about what it would be like if there was a mean type that was WORD!-like, with an interned immutable spelling. But it would error if you tried to access a variable holding it.
Notationally, I thought surrounding the word with ~
would be good:
Directory: ~file!~
I chose this because:
-
The argument for the purpose like in headers for "TBD" seems a solid one for a light and usable notation...vs. some monstrosity like
#[bad-word! "file!"]
. -
We're running out of symbols, so there is not much to pick from.
-
~ is undesirable for general use due to its hard-to-hit location on most keyboards.
-
~ is wavy and off-putting and weird--but that's an asset for this purpose.
It seems clear that this would be a win over what tilde is used for in today's codebases.
We could call the type TILDE! although that doesn't really have the connotations for its toxic nature. TOXIC! ? I've made my many arguments over time about why it's not UNSET! and I'm more entrenched in that thinking than ever.
UPDATE: This feature was originally called "labeled voids" in 2020--under a completely different set of terminology than being used a year later. Ultimately it was called BAD-WORD!, so I've retroactively edited this thread to use that...to try and make any points raised easier to follow.
Since these can be used as a kind of deferred error--a bad result that's only there to be bad if you actually use it--the text in these words could help guide you to what happened.
Example: With branching structures, it's confusing that nulls are turned into non-null if you don't use the @[...] branch forms. But wouldn't it be clearer if there was some name on that thing?
>> if true [null]
== ~branched~
Or if you reduce some code that tries to put a null in a block but can't:
>> reduce [<a> if false [<b>]]
== [<a> ~null~]
And variables that didn't have any definition could have a nice name too:
>> get/any 'asdfadsf
== ~unset~
Functions that had no value to return might go with ~no-return~ or ~nothing~.
UPDATE: Functions like PRINT which have no return result ultimately went with ~none~ for this purpose, as it is short and not used for anything else anymore.
This Feels Like A Strong Play For Ren-C's Hand
It makes the "brick" a lot more useful for building with, and you can already see above that it would guide people to better awareness with things like ~branched~.