Thread overview |
---|
March 12, 2009 [Issue 2729] New: hash_t undocumented and unnecessary | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2729 Summary: hash_t undocumented and unnecessary Product: D Version: 2.025 Platform: PC URL: http://www.digitalmars.com/d/2.0/arrays.html#associative OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: www.digitalmars.com AssignedTo: bugzilla@digitalmars.com ReportedBy: jlquinn@optonline.net hash_t is listed as the output of *some* toHash() functions, without specifying what it is. The type is not defined, but the documentation expects programmers to generate it anyway. size_t is presumably the logical choice. Since hash_t is being created by programmers, rather than being an opaque type, I don't see where the value in having it is. -- |
March 12, 2009 [Issue 2729] hash_t undocumented and unnecessary | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2729 ------- Comment #1 from jlquinn@optonline.net 2009-03-12 00:02 ------- Additionally, the requirements for user-defined hashing for structs and classes are inconsistent. First, struct requirements are listed as needing 2 members: const uint toHash() const int opCmp(Keytype*) Later, struct requirements are given again, but this time: hash_t toHash() bool opEquals(S) or bool opEquals(S*) int opCmp(S) or int opCmp(S*) Classes are supposed to match the 2nd set of functions. Shouldn't these functions be const? And S should be replaced by "Keytype" or the text above should state that S is a Keytype. -- |
March 13, 2009 [Issue 2729] hash_t undocumented and unnecessary | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2729 ------- Comment #2 from bugzilla@digitalmars.com 2009-03-12 23:56 ------- The value in hash_t is the self-documenting nature of it. It being called size_t instead implies it contains a value with a different purpose. But the page does need updating as to the rest of your comments, and I'll fix it. -- |
April 01, 2009 [Issue 2729] hash_t undocumented and unnecessary | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2729 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from bugzilla@digitalmars.com 2009-04-01 13:55 ------- Fixed DMD 2.027 -- |
Copyright © 1999-2021 by the D Language Foundation