When looking at bash, you can see it doing things that look nice and light:
# bash code
echo "Installed Version: $ANDROID_NDK_VERSION for the NDK"
Rebol isn't terrible:
; Rebol version
print ["Installed Version:" ANDROID_NDK_VERSION "for the NDK"]
But I'm becoming a believer that we should be thinking about offering versions that start by taking the words you write at face value, and marking the substitutions. That would suggest perhaps offering an echo like:
; A Rebol Echo with literal tendencies
echo [Installed Version: (ANDROID_NDK_VERSION) for the NDK]
But I've mentioned that even GROUP!s might want to be literal in such contexts for the default case (I often use parentheses in writing English, as I'm doing here). So perhaps a GET-WORD! would be more appropriate:
echo [Installed Version: :ANDROID_NDK_VERSION for the NDK]
That looks a bit unsatisfying. Beyond looking bad, it doesn't really call your attention to the escaping.
But it raises to my attention something that's just sort of generally true as a whole... GET-WORD! is unsatisfiying.
Leading colon, I've never liked you...
I've never liked the way x: :y looks. It doesn't have a good vibe...especially when you put a get right after a set like that.
We don't put colons in front of things in English, like, ever. While there's some amount of abstract symmetry to "colon in back means set, colon in front means get", we don't have to be a slave to that. If pure symbolic reversal were the way to invert meanings we'd use SET to set and TES to get. :-/
Is there a truly good reason not to use $FOO, $FOO/BAR, and $(FOO) for the "get" versions of things? It would still be a GET-WORD!, and could still be called that.
>> test: does [10]
>> type of first [$test]
== #[datatype! get-word!]
>> type of test
== #[datatype! integer!]
>> type of $test
== #[datatype! action!]
And for compatibility, we could make :foo load as $foo for the foreseeable future.
But as a dialecting component, I think it would be something a lot more people would want to use.
echo [Installed Version: $ANDROID_NDK_VERSION for the NDK]
And I think it actually looks better than the bash, with the brackets instead of quotes:
echo "Installed Version: $ANDROID_NDK_VERSION for the NDK"
Breaks One Experiment: The Shell Dialect
This would break one idea I had, which was to let a lone $ be a WORD!, so we could use it for shell commands.
print "Writing normal code here"
$ ls -alF ; processes to end of line by default
print "Done calling out to shell
But $ couldn't be a WORD!, as $/foo would be ambiguous. You can't tell if that's a GET-PATH! of the path /foo, or a plain PATH! of the word $ with foo picked out of it.
I can't think of any particular tricks here.
Now That I See It, I Can't Un-See It
Leading colon on words is ugly.
I've always found myself underwhelmed by the idea of using it in dialects.
The simple change of using dollar sign for this seems to give a tool for standing up against the likes of bash. Once we're past a compatibility period, maybe :foo
could be another text type. Or maybe just a URL! with no scheme?
Thoughts?