DIP 1011 library alternative
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue May 15 21:25:05 UTC 2018
Hello, I was reviewing again DIP 1011 and investigated a library
solution. That led to
https://gist.github.com/run-dlang/18845c9df3d73e45c945feaccfebfcdc
It builds on the opening examples in:
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1011.md
I'm displeased at two aspects of the implementation:
* Perfect forwarding is tedious to implement: note that makeDelegate
hardcodes void as the return type and (int, float) as parameter types.
Ideally it should accept any parameters that the alias passes.
* Pass-by-alias and overloading interact poorly. Does anyone know how to
refer by alias to one specific overload?
Thanks,
Andrei
More information about the Digitalmars-d
mailing list