Import improvement

Nick Treleaven ntrel-public at yahoo.co.uk
Thu Oct 18 05:38:44 PDT 2012


On 15/10/2012 14:02, Peter Alexander wrote:
> You could use something like this:
>
> import std.(stdio, xml, algorithm);
>
> Of course, there's many variations (square brackets, curly braces, no
> dot, no commas...) but it's all bikeshedding.

Personally I like:

import package std : stdio, xml, algorithm;

compare with:

import std.algorithm : sort, swap;

This has nice symmetry and is unambiguous.


More information about the Digitalmars-d mailing list