Kotlin roadmap?


#1

Hi,

Is there any plan of what is to be done before the first release? I think it would be good to see what major features or issues are pending this may not include any dates.


#2

Release is not so much about issues as at is about validation. Before we call it 1.0 and commit to maintaining backwards compatibility, we want to use Kotlin extensively in production (at JetBrains, and whoever else volunteers), so that we only cast things in stone when they are known to be good.

As of features, here’s a list to give you some idea:

  • Generic inner classes
  • SAM conversions for Java
  • Refactorings
  • Reflection
  • Lots of bug fixes and performance improvements

#3

+ plugins performance

and

string template expansion to be available in string returned in function or variable.

So we can have something like

fun stringFromExternalSource() : String{
  return “$name is $age year old”
}

val str = stringFromExternalSource().eval(name, age)
.


#4

Thanks a lot for your suggestion, but this is by no means a planned feature.


#5

It's a bummer. Right now in Android all strings should be externalized and having to rely on {0}s and {1}s in xml string is super annoying for translations since the context of the data is lost.


#6

What do you think about this?

``

fun String.replaceAll(vararg r: Pair<String, Any>): String {
  var result = this
  r forEach {
  result = result.replace(it.first, it.second.toString())
  }
  
  return result
}

fun main(args : Array<String>) {
  val name = “Abc”
  val age = 21
  
  val str = “{name} is {age} year old”.replaceAll("{name}" to name, “{age}” to age)
  
  print(str)
  
}

And for android You can write:
``

fun Context.getString(resId: Int, vararg r: Pair<String, Any>): String = this.getString(resId).replaceAll(*r)

val str = context.getString(R.string.msg, “{name}” to name, “{age}” to age)


#7

Ah, I didn't realize "to" create Pair. Awesome. Thanks.