Why only interfaces can be delegated to in kotlin? : <p>I have seen few similar questions, but none had explained why delegation is limited to interfaces?</p>

<p>Most of the time in practice we have something that has actually no interface at all, it is a class that implements nothing but provides some functionality or implements an abstract class.</p>

<p>Is there any fundamental limitation that forces this to be limited to interfaces or can we expect kotlin to have unrestricted delegation in the future?</p>

<p>This is especially useful if we want to extend functionality of a class using composition not inheritance.</p>

<pre><code>class A {}
class B(val a: A) : A by a {}
</code></pre>
