rhombus-prototype icon indicating copy to clipboard operation
rhombus-prototype copied to clipboard

The values returned by `make-custom-hash-types` and `make-custom-set-types` have a different order. Change one of them to improve consistency.

Open spdegabrielle opened this issue 6 years ago • 2 comments

@gus-massa The values returned by make-custom-hash-types and make-custom-set-types have a different order. Change one of them to improve consistency.

spdegabrielle avatar Jul 18 '19 12:07 spdegabrielle

Oh, another thing that is inconsistent between hash and set is the constructors:

For sets, we have: set (which is immutable), mutable-set, weak-set.

For hash maps, we have: hash (which is immutable), make-hash, make-immutable-hash, make-weak-hash.

Cross-ref: #49

sorawee avatar Jul 28 '19 20:07 sorawee

I am not sure if this fits best here, but I have several times hit the issue with making hashes with hash vs make-hash:

  • (hash key1 value1 key2 value2 ...) vs
  • (make-has (list (cons key1 value1) (cons key2 value2)))

I don't see a reason why hash and make-hash take arguments in different orders. Maybe related to #10, but probably complementary to it.

MarcKaufmann avatar Oct 23 '19 09:10 MarcKaufmann