metaeducation / ren-c

Library for embedding a Rebol interpreter into C codebases
GNU Lesser General Public License v3.0
128 stars 27 forks source link

Swap parameter meanings of 'FOO and :FOO #1105

Closed hostilefork closed 3 years ago

hostilefork commented 3 years ago

In function specs, Rebol2 used :FOO to mean "pass value at callsite literally", while it used 'FOO to mean "pass value literally unless it is a GET-WORD! or a GET-PATH!, in which case GET it".

R3-Alpha moved this to where 'FOO also would evaluate GROUP!s.

Ren-C has GET-GROUP!, so it completed the escaping pattern as GET-WORD! plus GET-PATH! plus GET-GROUP!, returning GROUP!s to being quoted normally for the escapable kind.

This commit makes another adjustment...which is to flip it. It makes more sense for the single quote tick to mean always use parameter as is (as if it had been quoted at the callsite). Then the form with a colon logically lines up for meaning that if the callsite matches the GET-XXX! pattern, then it will be escaped.