HaloO,
Smylers wrote:
But why would a hash be doing equality operations at all?
I think it does so in the abstract. A concrete implementation
might use the .id method to get a hash value directly.
Assuming that
a hash is implemented efficiently, as a hash, then it needs to be able
to map
Larry Wall schreef:
Dr.Ruud:
What would be the way to define-or-set that a specific hash has
non-case-sensitive keys?
Use a shaped hash with a key type that defines infix:===
appropriately, since object hashes are based on infix:=== rather
than infix:eq.
Suppose I want the keys to be
What would be the way to define-or-set that a specific hash has
non-case-sensitive keys?
Or broader: that the keys should be normalized (think NFKC()) before
usage?
Would it be easy to delegate it to the hash? (or use a hardly
noticeable wrapper)
--
Affijn, Ruud
Gewoon is een tijger.
HaloO,
Dr.Ruud wrote:
What would be the way to define-or-set that a specific hash has
non-case-sensitive keys?
There are two things in this:
(1) The syntax to type the keys of a hash---too bad that I forgot it
and currently don't find it in the Synopsyses. Pointers welcome!
(2) A way
TSa writes:
Dr.Ruud wrote:
What would be the way to define-or-set that a specific hash has
non-case-sensitive keys?
(2) A way to constrain a string to be case insensitive.
subset CaseInsensitive of Str where { .lc eq .uc }
but it actually is a constraint on the infix:eq, not on
TSa schreef:
Dr.Ruud:
What would be the way to define-or-set that a specific hash has
non-case-sensitive keys?
There are two things in this:
(1) The syntax to type the keys of a hash---too bad that I forgot it
and currently don't find it in the Synopsyses. Pointers welcome!
(2)
On Mon, May 08, 2006 at 12:34:26PM +0200, Dr.Ruud wrote:
: What would be the way to define-or-set that a specific hash has
: non-case-sensitive keys?
Use a shaped hash with a key type that defines infix:=== appropriately,
since object hashes are based on infix:=== rather than infix:eq.
: Or