raulraja
02/20/2020, 12:05 PMMike
02/20/2020, 12:56 PMdata class, making the constructor private, and overriding invoke in the companion object, BUT this is cleaner, and allows for usage of inline class, so the compiler can do it's thing with inline class that it wouldn't be able to do with a data class or class.
Keep up the great work on Arrow and Meta!simon.vergauwen
02/20/2020, 1:04 PMPositiveInt I can make this not compile PositiveInt(-1)simon.vergauwen
02/20/2020, 1:06 PMval i: PositiveInt? = -1 results in null
val i2: PositiveInt? = 3 results in 3
etcJannis
02/20/2020, 1:42 PMdata class + invoke can be bypassed by copy ^^ Thus this is also saferMike
02/20/2020, 1:45 PMMike
02/20/2020, 1:46 PMsimon.vergauwen
02/20/2020, 1:47 PMcopy in data-classes, or additional required boilerplate if not using data.Mike
02/20/2020, 2:00 PMMiguel Coleto
02/20/2020, 3:15 PMAttila Domokos
02/20/2020, 4:38 PMRefined. 😞raulraja
02/20/2020, 4:39 PMraulraja
02/20/2020, 4:40 PMAttila Domokos
02/20/2020, 4:40 PMraulraja
02/20/2020, 4:42 PMraulraja
02/20/2020, 4:43 PMAttila Domokos
02/20/2020, 4:43 PMraulraja
02/20/2020, 4:43 PMraulraja
02/20/2020, 4:44 PMraulraja
02/20/2020, 4:44 PMraulraja
02/20/2020, 4:45 PMJannis
02/20/2020, 4:45 PMraulraja
02/20/2020, 4:45 PMJannis
02/20/2020, 4:48 PMsimon.vergauwen
02/20/2020, 4:52 PMkapt which works on the JVM code. With Arrow Meta you work with the Kotlin code directly, so the inline class should still be tehresimon.vergauwen
02/20/2020, 4:53 PMsimon.vergauwen
02/20/2020, 4:53 PM