squint
squint copied to clipboard
Symbols
Should Clojure symbols map to Symbols, some custom type, or strings like keywords?
Not sure yet. Let's keep this open until we can make an informed decision.
In contrast to Clojure, Symbols in JS are identical (if created with /for and the same string). In Clojure, symbols are not interned and can care metadata. I think the are too different to map onto each other.
@borkdude that's only if you use Symbol.for
- if you use Symbol(string)
it will return a new symbol value each time.
Perhaps we should wait until we figure out how we're going to handle metadata for objects and other types
Indeed! Perhaps we can implement metadata using the protocol which uses the Symbol like you suggested.