I know the audience for my findings is, a small and self-selected one. But still…
don’t shoot the messenger:
x: 304 switch x [ 300 + 4 [ print "if things worked right, this would print" ] ... ]
Of course that is not the case in Rebol2/etc. You get instead the likes of:
switch '+ [ 300 + 4 [ print "this will print in R3-Alpha/Rebol2/Red, and it is misguided" ] ... ]
Mechanically speaking, it is possible for SWITCH to discern a BLOCK! it evaluated, from one that is referenced directly in the body.
not-literal-wont-print: [print "subtlety"] switch [print "this need not print"] [ ([print "subtlety"]) not-literal-wont-print ([print "subtlety"]) [print "...but this *will* print"] ]
I think it is becoming beyond question:
x: 10 switch type of x [ integer! [print "Don't you think this should run?"] ]
For the class of language that Rebol is, SWITCH should evaluate its clauses. It is a force multiplier, and the right answer.
Now comes the question: how much will this break, and how well can we be told what the breaks are?
My idea is a shim, that checks to see if SWITCH evaluates a value to a WORD! that does not look up to a datatype…and errors if so. This would be in effect for the indefinite future.
Perhaps we would have a switch/quote for the current behavior, aliased as switchq or something? I don’t know.
I have been conflicted for a while, about the tradeoffs, but when I think about things long enough, I solve them. I’m now sure about this.
Looking at these seemingly “big” issues–which to be honest–aren’t actually big (in terms of shaking language foundations) I think it’s interesting to quote Carl circa 2014:
Having taken a long break from Rebol development, I guess these days I’m more in favor of disruption and going down a better path for new users. As I’ve said many times, Rebol 3 is still in alpha. That means we get to fix stuff and make it better. Sorry if it’s a bit disruptive. There are always a few bumps in the development road, but you can
['t (sic)]be afraid to keep moving forward.
So “we’re sorry” but the right answers must emerge. And we need to have a way that your code can pin itself to a set of definitions, which I say we must make a hybrid Rebol2/R3-Alpha/Red dependency. If you say that’s what you depend on, then SWITCH must use the old meaning. We need to be sure this legacy idea is easy to use and works for those who can’t handle the truth.