We could just use a data class with one property
# announcements
t
We could just use a data class with one property
n
I'm no expert, but the basic idea is that this would behave differently in terms of optimization purposes
a class with one property, is still a class with one property
if you have a class Foo with a field val bar: Bar
then, when you have a
foo
, what you have is a pointer to some object
that object, in turn, has a pointer as well, to yet another object, the actual Bar
So this trivial "wrapper class" Foo, is turning a single indirection into a double indirection