Currently infix functions must have a single parameter. What about adding parameterless infix functions?
e.g.
infix fun String.uri() = URI.create(this)doSomethingWithUri(“http://www.example.com/” uri)
Currently infix functions must have a single parameter. What about adding parameterless infix functions?
e.g.
infix fun String.uri() = URI.create(this)doSomethingWithUri(“http://www.example.com/” uri)
Scala used to support this style of method invocation but it's deprecated now because it was too problematic:
http://docs.scala-lang.org/style/method-invocation.html#suffix_notation
http://stackoverflow.com/questions/13011204/scalas-postfix-ops