clr

2026-06-08T17:57:19.617869Z

Are equal uuids expected to be identical? in CLR? I feel like I ran into this in the past, but I don't recall what resulted from that (if anything).

;; cljr
=> (def uuid-1 #uuid "550e8400-e29b-41d4-a716-446655440000")
=> (def uuid-2 #uuid "550e8400-e29b-41d4-a716-446655440000")
=> (identical? uuid-1 uuid-2)
true
;; clj
=> (def uuid-1 #uuid "550e8400-e29b-41d4-a716-446655440000")
=> (def uuid-2 #uuid "550e8400-e29b-41d4-a716-446655440000")
=> (identical? uuid-1 uuid-2)
false

2026-06-08T18:01:28.187669Z

that's probably up to the host environment, right? identical? checks if the two objects are "the same object" which will necessarily differ depending on implementation details

2026-06-08T18:06:56.726299Z

for example, in python3, numbers below 257 have a stable identity, no matter how they're calculated

>>> a, b = 1, int(str(1))
>>> a is b
True
>>> x, y = 300, int(str(300))
>>> x is y
False

exitsandman 2026-06-08T18:07:40.367149Z

UUIDs are a structure type in C# no? Perhaps they compare by type + raw bytes.

2026-06-08T18:31:37.672899Z

Ah, yeah I think you're right. They are considered value types in C#, so no object ref.

👍 1
isak 2026-06-08T20:47:10.973679Z

user=> (identical? #uuid "550e8400-e29b-41d4-a716-446655440000" #uuid "550e8400-e29b-41d4-a716-446655440000")
true

isak 2026-06-08T20:47:58.797249Z

So just boxing since you access them from vars?

isak 2026-06-08T20:48:44.153929Z

user=> (let [a #uuid "550e8400-e29b-41d4-a716-446655440000" b #uuid "550e8400-e29b-41d4-a716-446655440000"] (identical? a b))
true