Roman Elizarov
1 min readOct 23, 2017

--

Yes. It will be possible with inline classes. Actually, to implement a decimal arithmetics with fixed number of digits after the decimal point there is an even faster and easier implementation using long as a base type. It would give you even more precisions — full 18 decimal digits. I might write a separate story about that one day. Maybe when inline classes are added to Kotlin :)

--

--

Roman Elizarov
Roman Elizarov

Written by Roman Elizarov

Project Lead for the Kotlin Programming Language @JetBrains

Responses (2)