Is it just me or Unit and UInt are too similar and...
# announcements
v
Is it just me or Unit and UInt are too similar and too easy to misread
d
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
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
Totally agree, in pure-Rx world explicit
Unit
is much more popular than
Int
or any other type. ๐Ÿ˜„
๐Ÿ‘ 1
d
Y'all need to switch to coroutines ๐Ÿ˜„ K coroutine ๐ŸงŒ
๐Ÿ˜† 2
p
Exactly! No more Completables ๐Ÿ‘
๐Ÿ‘ 1
a
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
Typealias? if it bothers you a lot
๐Ÿ‘ 1