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

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: