ClojureScript

Symbols should use caching-hash; also, nil as initial value

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Currently cljs.core.Symbol uses its own implementation of hash caching, even though it could use the caching-hash macro. To use the macro it would have to use nil rather than the current -1 as the initial value, but that's a feature (no reason to use a magic value in ClojureScript). Also, a private function for hashing symbols would be needed (but the whole thing still feels simpler).

The forthcoming patch makes the changes described above.

Activity

Michał Marczyk made changes -
Field Original Value New Value
Attachment 0001-CLJS-545-use-caching-hash-in-cljs.core.Symbol.patch [ 12067 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: