Playing arround with mixin - alias?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 21 02:42:33 PDT 2017


Martin Tschierschke wrote:

> Is it possible to define an alias for something like
>
> mixin(import("local_function_file.d"));
>
> to write only
>
>     use_local_function;
>
> which will be translated to: mixin(import("local_function_file.d"));
>
> (this additionally needs the file local_function_file.d in source/ +
> -J./source as parameter for dmd aka.  dflags "-J./source" in dub.sdl)
>
> Regards mt.

nope. the best you can get is `mixin use_local_function;`.

i'm assuming that you want your imported function behave like normally 
declared function here.


More information about the Digitalmars-d-learn mailing list