```listOf(1,2,3).sumOf { it.toDouble() } //works f...
# getting-started
l
Copy code
listOf(1,2,3).sumOf { it.toDouble() } //works fine
listOf(1,2,3).sumOf { it.toFloat() } //error: no applicable overload
can someone explain why?
l
Considering that workaround exists, we decided that overloads for
Float
do not pull their weight
wtf, it's literally 1 function with a 5loc body that is missing, how is that too much to ask for but thanks for the link
i
@LastExceed not one, but something about 12-13, considering all collection-like containers.
l
ok fair, i didnt consider that. but still, it seems pretty trivial to implement, and i find it bizarre that
UInt
or even
BigInteger
is apparently more important than
Float
e
like
Byte
and
Short
, `Float`'s use should usually be limited to storage, not computation. even Android has dropped
FloatMath
since
Math
on
Double
is faster.
l
oh thats interesting, i didn't know that. in that case the decision makes sense to me, ty 4 explaining