Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #988 (closed defect: wontfix)

Opened 16 years ago

Last modified 15 years ago

TypeInfo methods getHash, compare, equals unimplemented for AA, function and delegate

Reported by: fvbommel Assigned to: fawzi
Priority: major Milestone: 0.99.8
Component: Core Functionality Version: 0.99.5 Jascha
Keywords: triage Cc:

Description

TypeInfo.{getHash,equals,compare} aren't implemented for TypeInfo_AssociativeArray, TypeInfo_Function and TypeInfo_Delegate, causing the use of the relevant types as AA keys to fail.

(This bug is also present in Phobos: Bug #1929)

Newsgroup reference: digitalmars.D.learn:11732 (Phobos)

Change History

04/27/08 09:10:40 changed by larsivi

  • milestone changed from 0.99.6 to 0.99.7.

05/12/08 15:16:31 changed by larsivi

  • keywords set to triage.

07/10/08 11:01:54 changed by larsivi

  • milestone changed from 0.99.7 to 0.99.8.

07/26/08 03:36:04 changed by sean

  • status changed from new to assigned.

11/19/08 12:41:02 changed by larsivi

  • owner changed from sean to fawzi.
  • status changed from assigned to new.

11/21/08 13:44:51 changed by fawzi

this is connected to #1066 and #795, see the progress there.

03/10/09 12:08:30 changed by fawzi

(In [4400]) shared typeinfo and utils between compilers. better hashing closes #795 , refs #988

03/22/09 18:55:25 changed by fawzi

  • status changed from new to closed.
  • resolution set to wontfix.

I have improved typeinfo.

AA now have hashing and isEqual methods, but no compare method. In fact I cannot think of an efficient way of defining a total order on AA. the only think that I can think of is: order keys, compare the smallest, if equal compare the values, if equal drop key and repeat. In theory one can first use the hash, then the number of elements, and only if these two are equal proceed with the comparison (or maybe somehow use the partial hashes during the comparison, and probably treat exact equality as special case, to speed things up). Still this looks quite inefficient.

If someone proposes a good comparison algorithm I will use it, for now it is "won't fix"