You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's obvious that the Hashable class is about serialization, or feeding bytes to a consumer in a consistent way. We've found we already have to do mixConstructor, so already have something that looks close to a serialization/deserialization library. Note Hashable allows us to hash without allocating and actually writing to memory, so it is more appropriate to implement a serialization library in terms of (what we now call) Hashable rather than the other way around.
If we try this we'd also want a class for Hashable (Serializable) types of statically-known size (or even a statically-known maximum size for e.g. non-recursive sum types), so that the bytearray for a structure can be allocated all at once, when possible.
I don't have much motivation at the moment to build this or try to build consensus around using this as a core for hashing and serialization libraries, but just putting the idea in writing.
The text was updated successfully, but these errors were encountered:
It's obvious that the
Hashable
class is about serialization, or feeding bytes to a consumer in a consistent way. We've found we already have to domixConstructor
, so already have something that looks close to a serialization/deserialization library. NoteHashable
allows us to hash without allocating and actually writing to memory, so it is more appropriate to implement a serialization library in terms of (what we now call)Hashable
rather than the other way around.If we try this we'd also want a class for Hashable (Serializable) types of statically-known size (or even a statically-known maximum size for e.g. non-recursive sum types), so that the bytearray for a structure can be allocated all at once, when possible.
I don't have much motivation at the moment to build this or try to build consensus around using this as a core for hashing and serialization libraries, but just putting the idea in writing.
The text was updated successfully, but these errors were encountered: