[Home]
[Search]
[D]
Last update Jan 12, 2002
Compiler for D Programming Language
This is the D compiler (alpha).
Warning:
This is an alpha compiler for an alpha language. The language
may change in ways that break existing code. The compiler
does not implement all of the language. The compiler has
bugs in it. The compiler is intended as a way to try out
D language features, and not as a production development tool.
Files
- \dmd\bin\dmd.exe
- D compiler executable
- \dmd\bin\shell.exe
- Simple command line shell
- \dmd\lib\phobos.lib
- D runtime library
- \dmd\src\phobos\
- D runtime library source
- \dmd\html\d\
- Documentation
- \dmd\samples\d\
- Sample D programs
Requirements
Installation
Unzip the files. It can be xcopy'd over the \dm compiler
directories. Alternatively, add \dmd\bin to the PATH
and \dmd\lib to the LIB environment variables.
Example
Run:
\dmd\bin\shell all.sh
in the \dmd\samples\d directory for several small examples.
Compiler Switches
- dmd files.d ... { -switch }
- files.d
- D source files
- -c
- compile only, do not link (not implemented)
- -d
- allow deprecated features
- -debug
- compile in debug code
- -debug=level
- compile in debug code <= level
- -debug=ident
- compile in debug code identified by ident
- -g
- add symbolic debug info
- -gt
- add trace profiling hooks
- -Ipath
- where to look for imports
- -O
- optimize
- -oobjdir
- write .obj files to directory objdir
- -release
- compile release version
- -unittest
- compile in unittest functions
- -v
- verbose
- -version=level
- compile in version code >= level
- -version=ident
- compile in version code identified by ident
Linking
The programs must be linked with the D runtime library phobos.lib,
followed by the C runtime library snn.lib.
Bugs
These are some of the major bugs:
- Error reporting is dismal. The compiler quits on the first
error, and sometimes gets the line number wrong.
- Associative arrays are only implemented for int[char[]].
- The phobos D runtime library is woefully inadequate.
- Need to write a tool to convert C .h files into D imports.
- Array op= operations are not implemented.
- Property gettor/settor not implemented.
- In preconditions and out postconditions for member
functions are not inherited.
- The garbage collector is not multithreaded.
- It cannot be run from the IDDE.
- Packages and templates are not implemented.
- Many runtime checks, such as array bounds, are not implemented.
Feedback
We welcome all feedback - kudos, flames, bugs, suggestions, hints,
and most especially donated code! Join the fray in the
D forum.
Note: all D users agree that by downloading and using
D, or reading the D specs,
they release all claims to intellectual property rights in any posted
or emailed feedback to Digital Mars.
Copyright (c) 1999-2002 by Digital Mars, All Rights Reserved