opMixin or mixin function templates with convenience operator?

Daniel Kozak kozzi11 at gmail.com
Fri Dec 13 20:33:44 UTC 2019


On Thu, Dec 12, 2019 at 7:25 PM Paul Backus via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
>onally, I prefer this rewriting approach to something like
> opMixin because it doesn't require you to declare a struct as
> boilerplate, and it works "out of the box" for both templates and
> CTFE, as well as "naked" strings:
>
>      #foo!(args) => mixin(foo!args)
>      #foo(args)  => mixin(foo(args))
>      #someCode   => mixin(someCode)

AFAIK this is not possible. I have come with something like this many
years ago, but if I am remember correctly Walter said # is already
used for something else.
So we would need to change it to some other character


More information about the Digitalmars-d mailing list