Making D Lang More easy.
Jonathan M Davis
jmdavisProg at gmx.com
Thu May 12 08:17:00 PDT 2011
On 2011-05-12 04:01, Matthew Ong wrote:
> Hi Mafi,
>
> Thanks very much for the response in earlier post about the solid class.
>
> just FYI: import java.util.ArrayList; // can be written as
> import std.container : SList;
The syntax is valid for importing only a specific type or function from a
module, though I'd point out that SList and ArrayList are very different
container types in case you thought that they were at all the same.
> module gc.gcalloc;// from here.
> private import gcx : PAGESIZE; // are they the same or very different?
All imports are private by default, so adding private to it does nothing.
Adding public to it makes it so that any module importing the module with the
import in it also imports what that import imports. So public does something
there, but private is a no-op.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list