Chills
03/08/2020, 7:30 PMShawn
03/08/2020, 7:30 PM$language in $other_languageChills
03/08/2020, 7:31 PMShawn
03/08/2020, 7:33 PMShawn
03/08/2020, 7:34 PMPair or a Triple in Kotlin, but mimicking Go’s error handling is both a) not necessary and b) can be harder to read and work with in KotlinShawn
03/08/2020, 7:40 PMcomponentN functions, so you could destructure and have go-style syntax
val (res, err) = doThing()
but then you’re stuck with endless if (err != null) when Kotlin provides better alternatives like sealed classes for something like Result or Try or just a nullable result that you can use monadicallyShawn
03/08/2020, 7:41 PM