Curious as to why `Number` is a class as opposed t...
# language-evolution
n
Curious as to why
Number
is a class as opposed to an interface, any hints?
1
i
n
I see, thanks! Annoying legacy though. Hit this issue while trying to
Copy code
inline class Amount(val specialNumberNotation: String) : Number { ... }
k
I really wish they could've improved this. Maybe a
interface Numerical
that
Number
conforms to. Hopefully that'll happen someday; I really love using that kinda stuff in Swift
e
is should be definitely be an interface to allow unsigned to extend that as well
💜 2
h
not to mention an abstract class that has purely abstract members offers nothing of benefit over an interface
🤣 1
☝️ 2
l
Copy code
class MyData : CharSequence, List<Int>, Number() {
    ...
}
🧌 1
🙃 1