jckarter/clay — Issue #75: Delegation
Author: jckarter
Created: 2011-12-20 18:52:31+00:00
State: open
Labels: language-feature, v0.2

Delegation could be faked with universal overloads, but it would be more efficient and readable to have it built-in. General idea:

```
record Foo (foo:Int);
delegate (x:Foo) = ref x.foo;

bar(x:Int) = x + 1;
main() { println(bar(Foo(1))); } // prints 2, because bar(Foo) is delegated to bar(Int)
```