acton icon indicating copy to clipboard operation
acton copied to clipboard

Can (anonymous) tuples implement hashable automatically

Open plajjan opened this issue 1 year ago • 1 comments

It feels like tuples should be hashable when when they consist of fields that are hashable individually.

I think this requires #1677

plajjan avatar Dec 23 '24 10:12 plajjan

The catch is that our type system doesn't yet allow us to express an arbitrary tuple where every component is Hashable. This is something we want, though, not just for Hashable but for "Printable", "Serializable" and all such protocols in the pipe, as well as the subtree notion I'm seeing around the next corner for Orchestron.

Let's call the desired feature regular tuples! My hope is that they will be as flexible as Python's common use of dict[str,object] data, while supporting static type-safety.

nordlander avatar Dec 23 '24 12:12 nordlander