Re: "normalized" hash-keys

2006-05-09 Thread Dr.Ruud
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:. Suppose I want the keys

Re: "normalized" hash-keys

2006-05-09 Thread TSa
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 d

Re: "normalized" hash-keys

2006-05-08 Thread Larry Wall
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:. : Or bro

Re: "normalized" hash-keys

2006-05-08 Thread Ruud H.G. van Tol
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!

Re: "normalized" hash-keys

2006-05-08 Thread Smylers
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 &infi

Re: "normalized" hash-keys

2006-05-08 Thread TSa
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 to

"normalized" hash-keys

2006-05-08 Thread Dr.Ruud
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."