Advent of Code 2023

Siarhei Siamashka siarhei.siamashka at gmail.com
Mon Dec 4 03:50:47 UTC 2023


On Monday, 4 December 2023 at 03:07:07 UTC, matheus wrote:
>> import std.stdio;
>> import std.algorithm;
>> import std.array;
>> import std.format;
>> import std.conv;
>> import std.string;
>> ...
>
> Why do you do multiple imports instead of one import std;?
>
> I means is there any difference in CT?

The code indeed compiles faster with fewer imports and this pays 
off in the long run for the actively developed large projects. 
Additionally, it's a good idea not to pollute the namespace with 
the functions that the developer has no intention to use.


More information about the Digitalmars-d-learn mailing list