The nonconcrete field types anti-pattern is an anti-pattern in which a struct field is not concrete. The main problem with nonconcrete types for fields is that they can cause major performance problems. To understand why, let's take a look at the memory layout for composite types that have nonconcrete versus concrete types, then design and compare the two.
Nonconcrete field types anti-pattern
Understanding the memory layout of composite data types
Let's first take a look at a simple example for a composite type for tracking the coordinates of a point:
struct Point
x
y
end
When the field type is not specified, it is implicitly interpreted as Any, the super type of all types, hence the preceding code is syntactically...