What is Nostr?
yosh /
npub1u86…6gze
2024-11-25 00:41:24

yosh on Nostr: Interesting that a lot of traits in Rust are verbs (“Debug”, “Extend”, ...

Interesting that a lot of traits in Rust are verbs (“Debug”, “Extend”, “Read”, “Write”) but we also have “Iterator”.

The closest relation I can find is the “Hasher" trait, which is passed as an argument to the “Hash” trait, and is the stateful part that actually performs the hashing.

In that sense I don't actually think that “Iterator" is a misnomer either since it’s also stateful. But I now do wonder whether we maybe would have been better off naming “IntoIterator" as “Iterate" instead.
Author Public Key
npub1u86g6tc80vx4zt5xv6lh5rwammfwgs7envxf9nk02aa5u59cv43shd6gze