https://kotlinlang.org logo
Title
v

vpriscan

11/27/2019, 9:41 AM
Is it just me or Unit and UInt are too similar and too easy to misread
d

diesieben07

11/27/2019, 9:42 AM
Considering you almost never type out the
Unit
type I am not sure how relevant this is. Also your IDE will yell at you if you ever mix them up. But I do agree, they look similar.
v

vpriscan

11/27/2019, 9:47 AM
I use Unit pretty often when working with RxJava, it serves as a dummy signal value when I can't / don't want to use Completable. And when interoping with Java. And when writing libraries, I like function return types to be explicit, including Unit.
p

pawegio

11/27/2019, 10:00 AM
Totally agree, in pure-Rx world explicit
Unit
is much more popular than
Int
or any other type. 😄
👍 1
d

diesieben07

11/27/2019, 10:02 AM
Y'all need to switch to coroutines 😄 :kotlin-flag: :coroutine: :troll:
😆 2
p

pawegio

11/27/2019, 10:03 AM
Exactly! No more Completables 👍
👍 1
a

Alexey Belkov [JB]

11/27/2019, 11:08 AM
Please consider filing an issue on http://kotl.in/issue with sample code and a screenshot of how it looks in your IDE. Maybe something can be done on IDE side to disambiguate the types more clearly.
❤️ 2
p

pt

11/28/2019, 1:18 AM
Typealias? if it bothers you a lot
👏 1