-
In docs I found that all types are decalred as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @arteny - just catching up on some Vogen action! Apologies for the delay! Structs are a natural choice for value objects as they are small, have value-equality, and are immutable. |
Beta Was this translation helpful? Give feedback.
Hi @arteny - just catching up on some Vogen action! Apologies for the delay!
Whether or not to use a class/struct value object is the same as deciding whether to use a class/struct for any other type.
Some other frameworks for wrapping primitives, wrapped them all in a class, which had performance implications, as, for every instance, there was now heap pressure on the GC.
Structs are a natural choice for value objects as they are small, have value-equality, and are immutable.