On Monday, 16 January 2017 at 19:31:50 UTC, Mike Parker wrote:
On Monday, 16 January 2017 at 16:31:41 UTC, Brian wrote:
No, you don't understand I want to express meaning.
other programing language is allow this.
Your code more like the old C++.
If a high-level programing language or need haevy like C++
impl code, It's very regret.
Can like rust / swift / php / java / C# ?
Perhaps template this parameters [1]:
```
class Base {
void hello(this C)() {
(cast(C)this).world();
}
}
class Sub:Base {
void world() { writeln("Hello world"); }
}
void main() {
auto sub = new Sub;
sub.hello();
}
```
[1] http://dlang.org/spec/template.html#TemplateThisParameter
Thanks, I think this is the best way!