janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.38k stars 217 forks source link

`(= @"update" @"update")` is `false`. #1408

Closed amano-kenji closed 4 months ago

amano-kenji commented 4 months ago

This was a nasty surprise.

pepe commented 4 months ago

You should read at least the basic documentation then :-).

sogaiu commented 4 months ago

For potential future readers, I believe one place that covers this is the Deep Equality Operator section of the Comparison Operators page:

The primitive = operator does not compare the contents of mutable structures (arrays, tables, and buffers). Instead, it checks if the two values are the same object.

amano-kenji commented 4 months ago

:cat2: