5 ms·
> (def my-hash {:a 1 :b 2}) I don't know! That looks very unlispy. So much new syntax and inconsistent with the otherwise very uniform Lisp syntax. The Racket
by ctrlmeta 4y ago
> (def my-hash {:a 1 :b 2})
I don't know! That looks very unlispy. So much new syntax and inconsistent with the otherwise very uniform Lisp syntax.
The Racket alternative
> (define my-hash (make-hash))
> (hash-set! my-hash 'a 1)
> (hash-set! my-hash 'b 2)
looks much much better to me!
- soegaard 4y agoThere is more than one way to make a hash table in Racket. This one is more reasonable: (hash 'a 1 'b 2)