New names for "soft quoting" and "hard quoting"


#1

There’s a difference between a parameter specified as 'x and one passed as :x. As a reminder of the distinction:

 soft-quoter: func ['x] [-- x]

 >> soft-quoter add 1 2
 -- add ;; did not run the add, just grabbed the word
 == 2

 >> soft-quoter (1 + 2)
 -- 3 ;; evaluated the group
 == 3

 hard-quoter: func [:x] [-- x]

 >> hard-quoter add 1 2
 -- add ;; did not run the add, same as soft quote
 == 2

 >> hard-quoter (1 + 2)
 -- (1 + 2) ;; did not evaluate the group, different
 == (1 + 2)

It existed in R3-Alpha and predates me in Rebol lore. But the terminology distinction of “soft” and “hard” was something I introduced. I’ve liked that pretty well…though not a lot of conversations involve mentioning the difference. So I don’t know how other people have felt about it.

But now this isn’t “quoting” any more

I’ve explained that operators like QUOTE, UNQUOTE, and DEQUOTE are there to add and remove tick marks, and that this behavior is what gets the coveted rebQ() in the API.

 >> x: 10

 >> quote x
 == '10

 >> unquote first [''<hi>]
 == '<hi>

 >> dequote first [''<hi>]
 == <hi>

So what this parameter convention we’re talking about is not quoted parameters, but literal parameters, e.g. “take that parameter literally” not “add a quote onto that parameter”:

 >> x: 10

 >> lit x
 == x

But “hard literal” and “soft literal” doesn’t have the same ring to it…

…or maybe “hard quoting” and “soft quoting” weren’t actually any good in the first place, and I just got used to it.

Still, I feel that “literal” doesn’t have the same leeway as “quote” for saying there’s more than one form of it. It’s like how I don’t care for “strict equality”. How much more equal than equal can you get?

So to me, what was a hard quoted parameter becomes just a literal parameter, and that’s the right name for it.

Now what are soft literals? “figurative parameters”? (just kidding, that’s terrible)

One possibility would be to call them escapable literal parameters. So I’ll start the naming bidding there.