2 ms·
The last example made me wonder if it's possible to do something like this: val oneInch = 2.54.mm println("One inch is $oneInch.cm() centimeters")
by Myrth 9y ago
The last example made me wonder if it's possible to do something like this:
val oneInch = 2.54.mm
println("One inch is $oneInch.cm() centimeters")
- pvdebbe 9y agoMy hunch says that in order to be anywhere usable, any extra arithmetic must be done inside curly brackets, much like in Perl or PHP. It makes sense and is easy to parse for both human and compiler. println("foo ${oneInch.cm()} bar") println("fez $quux")