cqcallaw / newt

The newt programming language
GNU General Public License v3.0
12 stars 2 forks source link

Equality of complex types #58

Open cqcallaw opened 8 years ago

cqcallaw commented 8 years ago

The behavior for the == operator operating on two values of complex, use-defined types is currently not defined, and causes the runtime to crash.

Value equality seems well-aligned with project goals, though we want to avoid doing any more comparisons than necessary. For instance, some amount of comparisons can be avoided by observing that Symbol instances that contain immutable data can share memory, and if two symbols share memory, it implies the two symbols are equal.