Austin Hastings writes: > > --- [EMAIL PROTECTED] wrote: > > I agree. But I think that we can get away here with just hash > > properties , just like hash behaviour in <regexps> is controlled by > > properties . > > > > e.g. > > union: > > > > (%a,%b) ^is no_strict_keys ; > > (%a %b) ^is default_value ( 0 ) ; > > %a ^[+] %b > > > > intersection : > > > > (%a,%b) ^is strict_keys ; > > %a ^[+] %b > > > > > > this maybe longer but clear : one line - one concept . > > Arcadi, > > How would this work for hashes with differing properties? > > E.g., > > %a = ("apple" => 1, "abacus" => 2); > %b = ("banana" => 3, "abacus" => 2); > > %a ^is strict_keys; > %b ^is no_strict_keys; > > %c = %a ^[+] %b; > > What would happen?
in the result hash there will be only keys of %a, because %b *can admit unknown keys*, but %a - cannot > > %a rules?: %c == ("abacus" => 4) > %b rules?: %c == ("apple" => 1, "abacus" => 4, "banana" => 3) > strict_keys filters result?: %c == ("apple" => 1, "abacus" => 4) > > =Austin > arcadi