So I apologize to @giuliolunati for making him have to put up with the /
is a 2-element path containing BLANK!s debacle back in 2018.
On the positive side of me being mired in the implementation, I can see when something creates dissonance and edge cases...and know that things need to be avoided before someone in userspace would even know they needed to worry. The compiler gives me type checking errors when things don't line up, and I try my best to leverage whatever tools to catch inconsistencies I can (as far as C building as C++ can do, anyway).
But on the negative side it means I might pick the wrong form of regularity to solve the problem. This was such a case. We simply needed rules at PATH! creation time that prohibit you from putting special-slash-words into a path... and that's that.
So Now /
And .
Are Words Again
It's still going to be slippery. There will be problems:
math-context: make object! [
/+: enfix add.
/-: enfix subtract.
/.: enfix multiply.
/: enfix divide. ; ooops
]
You won't be able to say (/: enfix divide.)
to assign your division operator to a slash word!, because that will execute the function in the colon word!. So if whatever the colon word does takes an action as an argument, you're going to take enfixed divide as a parameter to that function... not perform an assignment. The PATH! is above the WORD!.
But things like (.:
) and (...:
) should work as expected. The WORD! is below the CHAIN!.
Is /:
Too Misleading to Execute?
It stands out a little as a mistake in the MATH-CONTEXT above next to the other assignments, when narrowly packed like that. Of course, it wouldn't be narrowly packed. And you could just be trying to assign an inert value and not a function:
What you wanted:
>> /: 10
== 10
>> /
== 10
What you'll likely get:
>> /: 10
** Error: Colon doesn't accept INTEGER! as its whatever argument
The evaluator could just refuse, and make you say run get $:
or set get $/
I'm tempted to say that's the right answer, because it seems like this will just lead to too much confusion otherwise.
That Won't Help You In "SET-WORD!" Gathering
If you can't get a "SET-WORD!" form of the slash word, the object won't collect the member.
We could sacrifice something like SET-FENCE! for this purpose, and say that MAKE OBJECT! will treat the fence as its WORD! contents for gathering purposes:
math-context: make object! [
/+: enfix add.
/-: enfix subtract.
/.: enfix multiply.
/{/}: enfix divide.
]
That's a pretty substantial sacrifice, to give up the meanings of all SET-FENCE! just for this one thing.
I don't have the answers. If I had the answers I wouldn't have been trying to dodge it. But I think the die is cast, and this needs some kind of creative solution.