# multiplatform

Deactivated User

09/20/2017, 9:07 AM
Other nice thing I would suggest: Allow to actual implement a header with a default implementation. A possible use case is this one:
Copy code
header fun ByteArray.copyRangeTo(srcPos: Int, dst: ByteArray, dstPos: Int, count: Int) {
	for (n in 0 until count) dst[dstPos + n] = this[srcPos + n]
Here I provide a generic implementation, that can be improved using System.arraycopy in JVM or the former for JS typed arrays, but as an optimization, not mandatory. So for example I wouldn’t have to implement for Konan at the very beginning and implement it later when optimizing things


09/21/2017, 12:41 PM
Interesting idea! Please report it as a feature request at

Deactivated User

09/25/2017, 9:30 AM
Sorry. Didn’t notice this (I still have issues with slack notifications) I have created the issue already!
👍 1