News for hackers. Stuff that matters.
Re:Swift is like Kotlin by Myrth on Thursday May 18, 2017 @01:25AM (#14365000)
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")

Re:Swift is like Kotlin by pvdebbe on Thursday May 18, 2017 @03:53AM (#14365534)
My 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")