- Official FAQ D 1.x, D 2.x (Alpha) DocComments/FAQ
- MKoD FAQ
- StackOverflow, D related
- DMD Complier
- Error Messages
See Searching Tips
Which parts of the Digital Mars D implementation are Free software? [Apr 04]
The DMD front-end source is available under dual ( GPL and Artistic) license. Phobos, the D standard library, is now licensed under a Boost 1.0 license unless the individual file specifies otherwise. The DMD compiler, back-end and libraries are licensed non-distributable under a DigitalMars license, but the source is available and comes with compiler. The D language specification and accompanying documents are similarly copyrighted to DigitalMars.
May anyone create their own D implementation (of course, following the D Specification), and call it "D"? [Apr 14]
Yes, in fact there have already been a few ports of the DMD source released: GDC and dli. The implementor should add a predefined version for the implementation and change std.compiler.name to reflect the new implementation. As far as I know, Walter has not mentioned any need for conformance testing requirements (such as with Sun's Java). Someone did suggest that we might want a "pureD" stamp of approval, but I'm pretty sure that wasn't Walter's idea.
Obviously if the implementor ignored the D Specification, the implementation wouldn't be very popular with the D community. I don't think Walter has any kind of trademark on the letter D, so I think we're basically on the honor system. -- JustinCalvarese
May I use the Digital Mars logo on my D project website? [Aug 03]
Yes, if it forms the link to Digital Mars! You can also use the images at the bottom of DigitalMars:d/dlinks.html [Walter Bright]
How stable is it to use in a final product development?
The D 1.x specification was finalized in 2007 allowing only for bug fixes in DMD or compiler features that did not change the specification. Its maintainance is scheduled to stop by the end of 2012.
D 2.x is the current main branch. Although its specification is mostly stable, it is a constantly evolving language. Most of the changes appear in the standard library, not in the core language. The languages changes may be additions, but great care is taken so that they are not breaking. Due to the newly available source, the DMD compiler has been receiving a great number of patches for bugs found in Bugzilla. A set of thousands of unit tests ensure that regressions are not introduced in new releases. A new release is usually scheduled every month.
compiler page for an progress on this. As for DMD, this will not be converted since there are more important things to work on and you can't get a D compiler on new architectures without using a compiler for that architecture.
specification on constructors for more information.
Foo f; void fv = (cast(void*)&f)[0..f.sizeof];and even:
void fv = (&f)[0..1];works, because any array implicitly converts to void.
There's some support for it already. For any object you can always get a ClassInfo structure and see the name of the class, which class is its parent and which interfaces it implements:
There's a pointer to the vtable, contructors, destructor and invariant methods. You can see the ClassInfo source in /dmd/src/phobos/object.d. [Julio CÚsar Carrascal Urquijo]
See also: How to... RTTI
Having a separate imaginary type is necessary for some complex arithmetic calculations that need to preserve the sign of branch cuts. Multiplying by an imaginary number doesn't have quite the same semantics as multiplying by 0+yi. Hopefully, this will explain it better than I can:
A branch cut (simplistically) is attempting to draw a distinction between +0 and -0. It comes up a lot in complex arithmetic calculations. Prof. Kahan did another paper on that, but unfortunately it isn't online. [Walter Bright]
The windows.d module is not yet complete. Declare the function you want to use:
and add kernel32.lib to your linker command.
There are at least 3 ways to keep the console window from appearing.
- Add -L/EXET:NT -L/SU:windows to the command line (Charles Sanders, NG:D/20386):
- Or create a .def file like the following and add the .def file to the command line:
- If you're using Bud to compile your application, an easier way is to add the following to bud's command line:
One of my early thoughts was also to clean up the win32 type system. Unfortunately, most code plays fast and loose with using C typedefs mixed in with the underlying types. Microsoft's own sample code is woefully inconsistent about it. It's so much easier to just use alias for them and not worry about it. Save the clean designs for doing something new, not legacy API's. (from NG:D/15278 by WalterBright)
Check out the page for writing DLLs.