Outdated advice

“Always program against an interface” is outdated advice from the days of Java and C#. This doesn’t apply in languages like Kotlin or Swift.

There’s no need to define an interface at the same time as a concrete type. With extensions, existing types can confirm to new interfaces.

Just program against concrete types, and only introduce a new interface when you actually need the indirection.