On Friday, 9 February 2018 at 01:55:10 UTC, Benny wrote:
On Friday, 9 February 2018 at 00:08:56 UTC, Adam D. Ruppe wrote:
On Thursday, 8 February 2018 at 23:50:29 UTC, Ali wrote:
- import ... really, we are 2018 and people are still wasting our time to have standard libraries as imports. Its even more fun when you split, only to need import the array library.


Look how ridiculous C++ like "import std.algorithm, std.conv, std.functional, std.math, std.regex, std.stdio;" some of the example on the front page look like.

It's easy enough to create std package like this:

module std;
public import std.algorithm;
//...

However, I'm a _huge_ fan of local imports and only importing what's needed. It helps with build times, binary sizes, and is a boon for finding where things are actually defined when DCD can't figure it out. And, of course, reduces namespace pollution.

Dependencies are usually bad. Imports are dependencies. Ergo...

Atila


Reply via email to