I'd suggest just going with the structs and making them transparent. It's
only three structs and only with a handful of fields, abstracting over them
with map and fold doesn't seem worth the added complexity IMO. But if you'd
really like to map and fold over structs, I highly recommend using
Hello. I have a project where I am needing to represent vectors (in the
mathematical sense), points, and colors. Both the vectors and points will
be 3D. I'm having trouble knowing what's an idiomatic way to represent and
interact with data types that are similar but different.
In general, I
On Sunday, 31 January 2021 at 08:07:27 UTC+11 Jens Axel Søgaard wrote:
Den tor. 21. jan. 2021 kl. 05.06 skrev Stuart Hungerford <
> stuart.h...@gmail.com>:
>
>> [...]
>> By using the Rust trait system (and later Haskell typeclasses) I could
>> create structure traits/typeclasses that don't clash
3 matches
Mail list logo