@joe @slava I know we talked about this as part of a shitpost thread, but can ei...

@zwarich@hachyderm.io

@joe @slava I know we talked about this as part of a shitpost thread, but can either of you think of a good way to combine traits (i.e. type classes) and bytewise equality / hashing while still preserving as much parametricity as possible? The natural thing is to have some marker trait with C++ style specialization, but that destroys a lot of the properties that you would want.

@joe mentioned (jokingly but maybe not) to just make it required and see how far you get. You could do something where you somewhat extend the meaning of bytewise comparability to recurse to slices (e.g. for contents of dynamic arrays) while excluding some fields at the end (e.g. for capacity fields of dynamic arrays, although perhaps you could just handle this by a coercion from a dynamic array to a slice?). I don't see a great way to get extensional hash sets, though.