On Friday, 30 September 2022 at 22:20:06 UTC, Salih Dincer wrote:
Maybe this will help you:
```d
template Bar(T)
{
  void fun() {}
}

class Foo(T)
{
  mixin Bar!T b;
  alias fun = b.fun;

  void test()
  {
    fun();
  }
}
```
SDB@79

The issue with that is in that case is instead of writing boilerplate I'll have to rewrite already existing functions.

Currently, to make objects compatible with Lua in some way, I have to write functions like this:

```d
package void scrollLayer(void* target, int x, int y) {
        Layer l = cast(Layer)target;
        l.scroll(x, y);
}
```

This is very time consuming, and some automated method would be preferred where it can be done (some manual stuff will be done of course), then I can further automate it by using user attributes.

Reply via email to