darkmoon_uk
12/16/2018, 1:24 PMgildor
12/16/2018, 1:45 PMgildor
12/16/2018, 1:46 PMdarkmoon_uk
12/16/2018, 2:11 PMdarkmoon_uk
12/16/2018, 2:11 PMViewContract
interface (without using `expected`/`actual`) still seems more appropriate.gildor
12/16/2018, 4:14 PMgildor
12/16/2018, 4:15 PMrusshwolf
12/16/2018, 5:22 PMexpect
gives you a couple things you can’t get with interfaces, such as top-level declarations and the ability to call constructors. You also get the guarantee that there’s exactly one implementation per platform, and the “dependency injection” happens for free without you needing to manually pass implementations of interfaces anywhere. But interfaces still have all the same functionality they did before, and have the advantage that they’re much easier to mock/stub out for testing.