Hacker News new | ask | show | jobs
by justingrantjg 498 days ago
Temporal includes `equals` methods on every type. String comparison sometimes works, but there are enough cases where it doesn't (especially when comparing strings that refer to the same data but were generated by different libraries so formatting is different for things like trailing zeroes of decimals, time zone aliases, etc.) that it's usually best to use a library function for comparison instead of just using string comparison.
1 comments

Comparison functions are unlikely to work across libraries too?