tavish pegram
07/18/2020, 6:03 PMraulraja
07/18/2020, 11:40 PMtavish pegram
07/18/2020, 11:52 PMOption
(mentioned in another ticket). it seems like having a Maybe
type is a standard in most functional languages and is good to have from a user standpoint, even if it duplicates a lot of behavior of Kotlin’s null safety or is equivalent to an Either
, though I assume I’m missing something about the long term vision for it./gradlew build
I’m getting these errors
Execution failed for task ':arrow-core-data:kaptGenerateStubsTestKotlin'.
> Could not resolve all files for configuration ':arrow-core-data:testCompileClasspath'.
> Could not find io.arrow-kt:arrow-mtl-data:0.11.0-SNAPSHOT.
Searched in the following locations:
- <https://jcenter.bintray.com/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/maven-metadata.xml>
- <https://jcenter.bintray.com/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/arrow-mtl-data-0.11.0-SNAPSHOT.pom>
- <https://kotlin.bintray.com/kotlinx/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/maven-metadata.xml>
- <https://kotlin.bintray.com/kotlinx/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/arrow-mtl-data-0.11.0-SNAPSHOT.pom>
- file:/Users/tavish/.m2/repository/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/maven-metadata.xml
- file:/Users/tavish/.m2/repository/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/arrow-mtl-data-0.11.0-SNAPSHOT.pom
Required by:
project :arrow-core-data
any advice on addressing this would be appreciated! Thank you!simon.vergauwen
07/19/2020, 6:49 PMOption
might seem a bit controversial but we believe it will push FP in Kotlin in the right direction. Beside that you still have typealias Option<A> = Either<Unit, A>
that offers the exact same semantics, and API if you need it. ?
is superior over Option
in performance, and we want to supplement the APIs so the removal of Option
shouldn't be felt from a user point of view.
The only technical issue with ?
is that in generic code A
not constraint as A : Any
, A
can be Int?
and thus using A?
in generic code can be unsafe as you might be checking the users null instead of your own.
So in generic code you should still use Either<Unit, A>
or Union2<Unit, A>
(when it becomes available), if you rely on null
as a signal.tavish pegram
07/20/2020, 1:23 AM0.10.5
allowed the build to succeed in arrow-core-lib
but it sounds like it should have been working with 0.11.0-SNAPSHOT
which was updated https://github.com/arrow-kt/arrow/pull/2116 . Is there something i’ve missed in my setup that would have gotten it to work locally with 0.11.0?Rachel
07/20/2020, 9:20 AMarrow-core
repository?tavish pegram
07/20/2020, 12:56 PM# Build properties
-COMMON_SETUP=<https://raw.githubusercontent.com/arrow-kt/arrow/master/setup.gradle>
-GENERIC_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/generic-conf.gradle>
-SUBPROJECT_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/subproject-conf.gradle>
-DOC_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/doc-conf.gradle>
-PUBLISH_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/publish-conf.gradle>
+COMMON_SETUP=file:///Users/tavish/projects/arrow/setup.gradle
+GENERIC_CONF=file:///Users/tavish/projects/arrow/generic-conf.gradle
+SUBPROJECT_CONF=file:///Users/tavish/projects/arrow/subproject-conf.gradle
+DOC_CONF=file:///Users/tavish/projects/arrow/doc-conf.gradle
+PUBLISH_CONF=file:///Users/tavish/projects/arrow/publish-conf.gradle
and reverting this made the build succeed for the snapshot.Rachel
07/20/2020, 1:32 PM