From package import syntax

bearophile bearophileHUGS at lycos.com
Thu Jan 24 18:03:54 PST 2013


This is the current syntax to import several modules from the std 
package:

import std.stdio, std.algorithm, std.range, std.array;


This is the syntax to import names from a module:

import std.stdio: writeln, write;


Currently this is not accepted, but do you like a syntax to 
import modules that is more consistent (the same as the one used 
to import names from a module)?

import std: stdio, algorithm, range, array;

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list