When should I use primitive types over structs and why?
Here is a concrete example:
I am working with a C code and there is a
UInt32 called LATCH that is interpreted in fancy ways. E.g. so me of its bits are flags and other bits encode two very small integers.
I need to interface with this C code and want an analogous julia type with same memory layout. There are to options:
struct Latch data::UInt32 end
primitive type Latch 32 end
Which one should I choose? What are the advantages/disadvantages?