Fork me on GitHub
#cljs-dev
<
2017-11-11
>
dpsutton16:11:09

cljs uuid asserts that the argument is a string. However, there is no real equivalent in clojure that this tracks so I was wondering what considerations there might be to making uuid idempotent by changing the assert to allowing uuid to take strings or uuids

dpsutton16:11:44

in clojure there's a reader for #uuid xxxx which asserts a string but that is different enough, in my mind, to not require that uuid assert a string on its argument

dpsutton18:11:26

@mfikes thanks but i think my issue is not related. I want uuid to be idempotent so that (uuid (uuid "stuff")) doesn't throw an error. I'm making maps that have uuids and I'd like to not worry about checking if the keys i want to uuid are already uuids

dpsutton18:11:00

but i can imagine that if the check added to core adds a branch in a path that is heavily used it might not be desirable