In the Stdlib the companion of `Byte` looks like t...
# stdlib
g
In the Stdlib the companion of
Byte
looks like this:
Copy code
public class Byte private constructor() : Number(), Comparable<Byte> {
    companion object {
        public const val MIN_VALUE: Byte = -128
        public const val MAX_VALUE: Byte = 127
...
Double
on the other hand looks like this:
Copy code
public class Double private constructor() : Number(), Comparable<Double> {
    companion object {
        public val MIN_VALUE: Double
        public val MAX_VALUE: Double
...
Is there are a particular reason, why the properties in
Double
are not
const
? This prevents me to use those properties in my own constants.
🤔 3
s
Seems non trivial to find a valid kotlin double expression that is the max value
c
@spand Why? 1.7976931348623157E308 is a valid Kotlin expression
s
Didn’t equal max value when I tried but maybe I made a mistake
c
That's weird, this is what println(Double.MAX_VALUE) gave me
s
Not at a computer but should be easy to check :-)