Making D Lang More easy.
Matthew Ong
ongbp at yahoo.com
Mon May 16 02:27:13 PDT 2011
On 5/12/2011 11:17 PM, Jonathan M Davis wrote:
> 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
Thanks Jonathan & Mafi for really contributing to allow me to learn the
detail differences of D importing.
The ugly trail I posted about compilation error is due to -lib option
always being dropped by the D-IDE and since, I switched to eclipse DDT
as mafi suggested and also ONLY have ONE file(I do not like this
limitation) per module. That problem is resolved.
--
Matthew Ong
email: ongbp at yahoo.com
More information about the Digitalmars-d
mailing list