Shawn Witte
09/26/2020, 4:47 AMexpect/actual
vs using an interface. I'm especially curious if there are use cases for expect/actual
that can't be solved with an interface or are obviously better suited to the expect/actual
pattern. I asked a question on the forums, but it didn't get any traction.ian.shaun.thomas
09/26/2020, 4:52 AMSam
09/26/2020, 3:42 PMShawn Witte
09/26/2020, 9:03 PMexpect fun getNumericInput(): Int
or expect class MenuIO
where I keep all the necessary IO functions
2. Create an interface MenuIO
that I implement and inject from the platform-level entry points.
It seems to me that the general rule you're both getting at could be stated "interfaces for injectables and expect/actual for newables" (assuming the injectable/newable dichotomy)