karelpeeters
10/24/2019, 8:50 PMoperator fun invoke in `Either.Left`: why is it there? It looks like a constructor but I can't think of a case where the behavior would be different from just making the constructor public instead. It made sense for kategory when Either.Left had two type parameters so you wouldn't have to specify the Nothing type explicitly (https://github.com/JcMinarro/kategory/blob/master/kategory-core/src/main/kotlin/kategory/data/Either.kt#L125), but why does arrow have it too? (https://github.com/arrow-kt/arrow/blob/master/modules/core/arrow-core-data/src/main/kotlin/arrow/core/Either.kt#L818).
For that matter, why did Either.Left ever have two type parameters in kategory?raulraja
10/24/2019, 9:43 PMraulraja
10/24/2019, 9:45 PMraulraja
10/24/2019, 9:45 PMraulraja
10/24/2019, 9:46 PMraulraja
10/24/2019, 9:48 PMkarelpeeters
10/24/2019, 9:51 PMkarelpeeters
10/24/2019, 9:52 PMclass Left<A>(val a: A): Either<A, Nothing> ever not allowed in Kotlin?raulraja
10/24/2019, 9:53 PMraulraja
10/24/2019, 9:55 PMraulraja
10/24/2019, 9:56 PMkarelpeeters
10/24/2019, 9:58 PMkarelpeeters
10/24/2019, 9:58 PMEither.Left still had two type parameters.pakoito
10/24/2019, 9:59 PMpakoito
10/24/2019, 9:59 PMNothing, which I cannot even remember if it’s what we use these days, used to be inferred poorly in kotlin 1.0pakoito
10/24/2019, 9:59 PMkarelpeeters
10/24/2019, 10:00 PMLeft even had a weird dummy Unit variable: https://github.com/arrow-kt/arrow/commit/32e115dc33a0b6dfa5d4fa036d7b7c0042658f83)karelpeeters
10/24/2019, 10:02 PMNothing which was scary 🙂pakoito
10/24/2019, 10:04 PM