bod
01/14/2020, 5:38 PMfooBar(a: Int? = null, b: String? = null, c: String? = null)
where actually either a, b or c should be non null. Is there an idiomatic way to do this? I think Sealed classes would work, but a bit cumbersome. I've also seen people talking about an Either type (there's one in Arrow). Thoughts?Dominaezzz
01/14/2020, 5:45 PMbod
01/14/2020, 5:48 PMfooBar
?Dominaezzz
01/14/2020, 5:51 PMbod
01/14/2020, 5:52 PMDominaezzz
01/14/2020, 5:52 PMfooBarA
, fooBarB
and fooBarC
make sense?Dominaezzz
01/14/2020, 5:52 PMbod
01/14/2020, 5:54 PMStavFX
01/14/2020, 6:25 PMfooBar
to avoid the duplicated code. You’re still in the same problem as in the beginning, but at least now we can make the problematic method private
bod
01/14/2020, 6:31 PMbod
01/14/2020, 6:31 PM