What are the reasons for this syntax??

Matthew Ong ongbp at yahoo.com
Tue May 24 03:59:15 PDT 2011


Hi ALL,

Refering to these 2 URL:
http://hg.dsource.org/projects/dwt2/file/d00e8db0a568/base/src/java/io/FileOutputStream.d

// why the public here?
6 public import java.io.File;
7 public import java.io.OutputStream;
9 import java.lang.all; // I can understand this here.

13} else { // Phobos
    // Why the import needed static?
14 static import std.file;
15 static import std.path;
16}

// What is the purpose of using alias here?
20 alias java.io.OutputStream.OutputStream.write write;
21 alias java.io.OutputStream.OutputStream.close close;


http://hg.dsource.org/projects/dwt2/file/d00e8db0a568/base/src/java/io/ByteArrayInputStream.d

8 alias java.io.InputStream.InputStream.read read;
9 alias java.io.InputStream.InputStream.skip skip;
10 alias java.io.InputStream.InputStream.available available;
11 alias java.io.InputStream.InputStream.close close;
12 alias java.io.InputStream.InputStream.mark mark;
13 alias java.io.InputStream.InputStream.reset reset;
14 alias java.io.InputStream.InputStream.markSupported markSupported;

Thanks very much.

-- 
Matthew Ong
email: ongbp at yahoo.com



More information about the Digitalmars-d mailing list