Darren Duncan wrote:
> Jon Lang wrote:
>> So what about custom delimiters?
>>
>> q:2<1100100101>
>> q:8[57013]
>> q:16~DEADBEEF~
>
> Well, sure, if its useful; the idea is to amalgam numeric and Str syntax.
> However, because a Blob literal presumably just has 0..9,A-Z,_ characters in
> its payload, one of the main uses of custom delimiter flexibility, which is
> avoiding conflicts with payload elements, isn't necessary.

True enough.  OTOH, I've also used custom delimiters for visual distinction.

>>>> -As with C<Hash> types, C<Pair> and C<Mapping> are mutable in their
>>>> +As with C<Hash> types, C<Pair> and C<PairSet> are mutable in their
>>>>  values but not in their keys.  (A key can be a reference to a mutable
>>>>  object, but cannot change its C<.WHICH> identity.  In contrast,
>>>>  the value may be rebound to a different object, just as a hash
>>>>  element may.)
>>>
>>> So given that PairSet is mutable as a whole (while PairValSet is
>>> immutable),
>>> can you please clarify the difference between PairSet and Hash, both of
>>> which have immutable keys and mutable values?
>>
>> Back when it was Mapping, I was under the impression that the
>> difference involved whether or not the component Pairs were ordered -
>> that is, a Mapping was Positional as well as Associative.  I could be
>> wrong.
>
> I was never under the assumption that Mapping was Positional; it was an
> immutable Hash essentially, and both were associative not ordered.  So
> Mapping was renamed to PairValSet, and PairSet was added as a mutable
> alternative, hence how the latter differs from Hash is the question.  I
> think only Capture et al are both associative and ordered.  If you want an
> ordered list of Pair, I don't think that has its own type otherwise, but you
> can parameterize one from Seq/Array/etc.

Note that before this most recent change, the document read as "As
with C<Hash> types, C<Pair> and C<Mapping> are mutable in their values
but not in their keys."  Now it reads as "As with C<Hash> types,
C<Pair> and C<PairSet> are mutable in their values but not in their
keys."  I may be wrong about what the difference between a Mapping and
a Hash used to be; but the above says that Mapping was mutable in its
values, not immutable; and that it was replaced by PairSet, not Pair.
Presumably, there was already something in place to differentiate a
Mapping from a Hash; and whatever that difference was, it still
applies to PairSet vs. Hash (which would possibly make PairSet a poor
choice of names, depending on the difference).

-- 
Jonathan "Dataweaver" Lang

Reply via email to