Larry wrote:
The set features are a side effect of junctions, just as they're a side
effect of hashes. An "any" junction might well be implemented underneath
as a hash without values.
Yep.
Possibly we might even extend the notion of hash to any "junk".
%hash = 1 | 2 | 3;
So you're suggestion that a "normal" hash is a junction of pairs???
Or that assigning a junction to a hash takes every state of the junction
and creates an entry for it whose value is true???
Either way I worry about this notion, because of the subtle
differences between:
%hash = map {$^x=>1} (1,2,3);
%hash = any(1,2,3);
%hash = all(1,2,3);
%hash = one(1,2,3);
%hash = none(1,2,3)
I'd really rather not see junctions being the only scalar type that can be
marked with C<%>.
Unless, of course, we're deliberately *trying* to install nasty
inconsistencies for Simon to discover! ;-)
Then it's clearer that something junctional is going on when you say:
if $val ~~ %hash
I could see % becoming the sigil of choice for junks just for the
documentational value.
Curiously, the reduction of the documentational value of C<%> always
meaning "hash" is exactly why I *wouldn't* like to see it!
Damian