This ties together quite nicely. cc: @bradrn
So I'd been fretting over whether @
would bind the thing you passed it or not. It had to bind things for the system to work, so I went with that... even though it may not be what you want in all cases:
>> abc: 10
>> word: @ abc
== abc
>> get word
== 10
@foo
is a THE-WORD! and so @
makes sense as a synonym for an operator called THE.
>> the abc
== abc ; bound
But what if you don't want a binding? THE/UNBOUND? Is there no symbol?
A Part In The Box Becomes Available: APOSTROPHE (')
For a very long time, apostrophe was considered the quoted form of VOID (or NULL, before void existed). So it evaluated to void, and voids were invisible in the console:
>> if false [print "conditional returns void"]
>> meta if false [print "conditional returns void"]
'
>> quote void
== '
>> append [a b c] '
== [a b c]
"Isn't that cool", I thought. "Void is the absence of anything, and so when you quote it you get just a lone apostrophe. And when the lone apostrophe boils away after removing the quote in evaluation, you have nothingness!!! It's perfect for displaying nothing as a result!"
Slow clap.
It was a cute idea in the pre-isotopic era. But once we had quasiforms and antiforms, making void the antiform of the word void
has many more merits.
So lone apostrophe went back into the "unused" bin, and I wondered what to do with it. What type would it be? Couldn't be a WORD!
But... SIGIL! Were Invented Simultaneously To ~void~
They happened in basically the same week. I'm not sure why it didn't occur to me to make '
a SIGIL!
Why not?
>> sigil of first [''a]
== '
Now we have our non-binding literal operator.
>> abc: 10
>> word: ' abc
>> get word
** Script Error: abc word is not bound to a context
And I think a good name for it would be... JUST:
>> just abc
== abc ; not bound
-
It's a good part of speech (LITERAL seems like a variable name)
-
It's short (LITERALLY would be obnoxious)
-
I think that JUST has a good shade of meaning of "just give me the array element, I don't want the extras...no pickles, no lettuce, and no binding"
Seems Perfect To Me
This goes along with the idea of when you declare your function arguments as being literal, if you say 'foo
for the argument you will get it with no added binding, and if you say @foo
it will bind in the context of the callsite.
Anyway, they're "literal arguments"... not "quoted arguments"... because no quoting level is added. Except perhaps an imaginary quoting level added in your head at the callsite which the evaluator strips off, but that doesn't happen. (In fact it can't happen for @, because for anything but a plain WORD!/BLOCK!/TUPLE!/etc. there's no way to add an @ onto something like an INTEGER! or the like.)