Is there an alias for standard libraries to use in import statement?

BoQsc vaidas.boqsc at gmail.com
Sun Jul 4 07:40:44 UTC 2021


I just started with a fresh look at the D language and would like 
to be able to rewrite this code:

> import std;
> void main()
> {
>     writeln("Hello D");
> }
> 
Into more readable standard library name:
> 
> import system;
> void main()
> {
>     writeln("Hello D");
> }

Or into this

> import library.standard;
> void main()
> {
>     writeln("Hello D");
> }


Or into this:

> import library phobos;
> void main()
> {
>     writeln("Hello D");
> }

These were the examples that might feel more readable and natural 
than simply a three letter junction:
> import std;


What do you think?


More information about the Digitalmars-d-learn mailing list