diff -uNr dmd-0.177/dmd/html/d/abi.html dmd-0.178/dmd/html/d/abi.html --- dmd-0.177/dmd/html/d/abi.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/abi.html 2006-12-10 23:01:00.000000000 +0100 @@ -32,7 +32,7 @@ -
Last update Tue Dec 5 18:54:30 2006 +
Last update Sun Dec 10 23:00:59 2006
@@ -148,29 +148,32 @@ code shall have access to the entire C ABI runtime library.

+

Basic Types

TBD

+

Structs

Conforms to the target's C ABI struct layout.

+

Classes

An object consists of:

- - - - +
offset contents
0 pointer to vtable
4 monitor
8... non-static members
+ + +
offset contents
0 pointer to vtable
ptrsize monitor
ptrsize*2... non-static members

The vtable consists of:

- - - +
offset contents
0 pointer to instance of ClassInfo
4... pointers to virtual member functions
+ +
offset contents
0 pointer to instance of ClassInfo
ptrsize... pointers to virtual member functions

The class definition:

@@ -190,33 +193,35 @@
  • An instance of StaticClassXXXX called StaticXXXX for the static members.
  • +

    Interfaces

    TBD

    +

    Arrays

    A dynamic array consists of:

    - - - +
    offset contents
    0 array dimension
    4 pointer to array data
    + +
    offset contents
    0 array dimension
    size_t pointer to array data
    -

    - A dynamic array is declared as: +

    A dynamic array is declared as:

    type[] array;
     
    - whereas a static array is declared as: +

    whereas a static array is declared as:

    type[dimension] array;
     
    - Thus, a static array always has the dimension statically available as part of the type, and +

    Thus, a static array always has the dimension statically available as part of the type, and so it is implemented like in C. Static array's and Dynamic arrays can be easily converted back and forth to each other. +

    Associative Arrays

    @@ -226,15 +231,17 @@ The current implementation is contained in phobos/internal/aaA.d.

    +

    Reference Types

    - D has reference types, but they are implicit. For example, classes are always +

    D has reference types, but they are implicit. For example, classes are always referred to by reference; this means that class instances can never reside on the stack or be passed as function parameters. -

    +

    - When passing a static array to a function, the result, although declared as a static array, will +

    When passing a static array to a function, the result, although declared as a static array, will actually be a reference to a static array. For example: +

    int[3] abc;
     
    @@ -248,6 +255,7 @@ +

    Name Mangling

    D accomplishes typesafe linking by mangling a D identifier @@ -268,8 +276,7 @@

    The M means that the symbol is a function that requires - a this - pointer.

    + a this pointer.

    Template Instance Names have the types and values of its parameters encoded into it: @@ -386,6 +393,7 @@ the number of characters in the Name.

    +

    Type Mangling

    Types are mangled using a simple linear scheme:

    @@ -555,6 +563,7 @@ B Number Arguments +

    Function Calling Conventions

    The extern (C) calling convention matches the C calling convention @@ -581,6 +590,8 @@ + +

    Return Value

    + +

    Parameters

    The parameters to the non-variadic function:

    @@ -706,34 +719,47 @@ _argptr is not passed, it is computed by the callee.

    + + +

    Exception Handling

    Windows

    - Conforms to the Microsoft Windows Structured Exception Handling +

    Conforms to the Microsoft Windows Structured Exception Handling conventions. - TBD +

    + +

    Linux

    - Uses static address range/handler tables. +

    Uses static address range/handler tables. TBD +

    + + +

    Garbage Collection

    - TBD +

    The interface to this is found in phobos/internal/gc.

    +

    Runtime Helper Functions

    - TBD +

    These are found in phobos/internal.

    +

    Module Initialization and Termination

    - TBD +

    TBD

    +

    Unit Testing

    - TBD +

    TBD

    + diff -uNr dmd-0.177/dmd/html/d/acknowledgements.html dmd-0.178/dmd/html/d/acknowledgements.html --- dmd-0.177/dmd/html/d/acknowledgements.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/acknowledgements.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:31 2006 +
    Last update Sun Dec 10 22:56:56 2006
    diff -uNr dmd-0.177/dmd/html/d/arrays.html dmd-0.178/dmd/html/d/arrays.html --- dmd-0.177/dmd/html/d/arrays.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/arrays.html 2006-12-15 02:20:44.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Sat Dec 9 00:40:27 2006 +
    Last update Fri Dec 15 02:20:42 2006
    @@ -147,54 +147,57 @@
    int* p;
     
    - These are simple pointers to data, analogous to C pointers. +

    These are simple pointers to data, analogous to C pointers. Pointers are provided for interfacing with C and for specialized systems work. There is no length associated with it, and so there is no way for the compiler or runtime to do bounds checking, etc., on it. Most conventional uses for pointers can be replaced with - dynamic arrays, out - and inout - parameters, + dynamic arrays, out and inout parameters, and reference types. +

    Static Arrays

    int[3] s;
     
    - These are analogous to C arrays. Static arrays are distinguished +

    These are analogous to C arrays. Static arrays are distinguished by having a length fixed at compile time. -

    +

    - The total size of a static array cannot exceed 16Mb. +

    The total size of a static array cannot exceed 16Mb. A dynamic array should be used instead for such large arrays. -

    +

    - A static array with a dimension of 0 is allowed, but no +

    A static array with a dimension of 0 is allowed, but no space is allocated for it. It's useful as the last member of a variable length struct, or as the degenerate case of a template expansion. +

    Dynamic Arrays

    int[] a;
     
    - Dynamic arrays consist of a length and a pointer to the array data. +

    Dynamic arrays consist of a length and a pointer to the array data. Multiple dynamic arrays can share all or parts of the array data. +

    Array Declarations

    - There are two ways to declare arrays, prefix and postfix. +

    There are two ways to declare arrays, prefix and postfix. The prefix form is the preferred method, especially for non-trivial types. +

    Prefix Array Declarations

    - Prefix declarations appear before the identifier being +

    Prefix declarations appear before the identifier being declared and read right to left, so: +

    int[] a;	// dynamic array of ints
     int[4][3] b;	// array of 3 arrays of 4 ints each
    @@ -206,9 +209,10 @@
     
     

    Postfix Array Declarations

    - Postfix declarations appear after the identifier being +

    Postfix declarations appear after the identifier being declared and read left to right. Each group lists equivalent declarations: +

    // dynamic array of ints
     int[] a;
    @@ -234,21 +238,24 @@
     int (*e)[];
     
    - Rationale: The postfix form matches the way arrays are +

    Rationale: The postfix form matches the way arrays are declared in C and C++, and supporting this form provides an easy migration path for programmers used to it. +

    Usage

    - There are two broad kinds of operations to do on an array - affecting +

    There are two broad kinds of operations to do on an array - + affecting the handle to the array, and affecting the contents of the array. C only has operators to affect the handle. In D, both are accessible. -

    +

    - The handle to an array is specified by naming the array, as +

    The handle to an array is specified by naming the array, as in p, s or a: +

    int* p;
     int[3] s;
    @@ -273,10 +280,11 @@
     
     

    Slicing

    - Slicing an array means to specify a subarray of it. +

    Slicing an array means to specify a subarray of it. An array slice does not copy the data, it is only another reference to it. For example: +

    int[10] a;	// declare array of 10 ints
     int[] b;
    @@ -288,8 +296,9 @@
     foo(b[1]);	// equivalent to foo(3)
     
    - The [] is shorthand for a slice of the entire array. +

    The [] is shorthand for a slice of the entire array. For example, the assignments to b: +

    int[10] a;
     int[] b;
    @@ -299,12 +308,13 @@
     b = a[0 .. a.length];
     
    - are all semantically equivalent. -

    +

    are all semantically equivalent. +

    - Slicing +

    Slicing is not only handy for referring to parts of other arrays, but for converting pointers into bounds-checked arrays: +

    int* p;
     int[] b = p[0..8];
    @@ -312,11 +322,12 @@
     
     

    Array Copying

    - When the slice operator appears as the lvalue of an assignment +

    When the slice operator appears as the lvalue of an assignment expression, it means that the contents of the array are the target of the assignment rather than a reference to the array. Array copying happens when the lvalue is a slice, and the rvalue is an array of or pointer to the same type. +

    int[3] s;
     int[3] t;
    @@ -329,22 +340,24 @@
     s[0..2] = t;		// error, different lengths for lvalue and rvalue
     
    - Overlapping copies are an error: +

    Overlapping copies are an error:

    s[0..2] = s[1..3];	// error, overlapping copy
     s[1..3] = s[0..2];	// error, overlapping copy
     
    - Disallowing overlapping makes it possible for more aggressive +

    Disallowing overlapping makes it possible for more aggressive parallel code optimizations than possible with the serial semantics of C. +

    Array Setting

    - If a slice operator appears as the lvalue of an assignment +

    If a slice operator appears as the lvalue of an assignment expression, and the type of the rvalue is the same as the element type of the lvalue, then the lvalue's array contents are set to the rvalue. +

    int[3] s;
     int* p;
    @@ -355,8 +368,9 @@
     
     

    Array Concatenation

    - The binary operator ~ is the cat operator. It is used +

    The binary operator ~ is the cat operator. It is used to concatenate arrays: +

    int[] a;
     int[] b;
    @@ -366,26 +380,29 @@
     		// b and c arrays
     
    - Many languages overload the + operator to mean concatenation. +

    Many languages overload the + operator to mean concatenation. This confusingly leads to, does: +

    "10" + 3
     
    - produce the number 13 or the string "103" as the result? It isn't +

    produce the number 13 or the string "103" as the result? It isn't obvious, and the language designers wind up carefully writing rules to disambiguate it - rules that get incorrectly implemented, overlooked, forgotten, and ignored. It's much better to have + mean addition, and a separate operator to be array concatenation. -

    +

    - Similarly, the ~= operator means append, as in: +

    Similarly, the ~= operator means append, as in: +

    a ~= b;		// a becomes the concatenation of a and b
     
    - Concatenation always creates a copy of its operands, even +

    Concatenation always creates a copy of its operands, even if one of the operands is a 0 length array, so: +

    a = b;			// a refers to b
     a = b ~ c[0..0];	// a refers to a copy of b
    @@ -536,21 +553,16 @@
     
     	

    For the .sort property to work on arrays of class objects, the class definition must define the function: - int opCmp(Object) -. This is used to determine the + int opCmp(Object). This is used to determine the ordering of the class objects. Note that the parameter - is of type Object -, not the type of the class.

    + is of type Object, not the type of the class.

    For the .sort property to work on arrays of structs or unions, the struct or union definition must define the function: - int opCmp(S) - or - int opCmp(S*) -. - The type S - is the type of the struct or union. + int opCmp(S) or + int opCmp(S*). + The type S is the type of the struct or union. This function will determine the sort ordering.

    @@ -569,8 +581,7 @@

    Setting Dynamic Array Length

    - The .length - property of a dynamic array can be set + The .length property of a dynamic array can be set as the lvalue of an = operator:
    array.length = 7;
    @@ -799,8 +810,7 @@
     
    str ~= "\0";
     
    -

    or use the function std.string.toStringz -.

    +

    or use the function std.string.toStringz.

    The type of a string is determined by the semantic phase of compilation. The type is @@ -875,38 +885,30 @@

    Implicit Conversions

    -

    A pointer T* - can be implicitly converted to - a void* -. - A static array T[dim] - can be implicitly +

    A pointer T* can be implicitly converted to + one of the following:

    + +
    • void*
    • +
    + +

    A static array T[dim] can be implicitly converted to one of the following:

      -
    • T* -
    • T[] -
    • void* - -
    • void[] - +
    • T[]
    • +
    • U[]
    • +
    • void[]
    -

    A dynamic array T[] - can be implicitly converted to +

    A dynamic array T[] can be implicitly converted to one of the following:

      -
    • T* -
    • void* - -
    • void[] - -
    • U[] -
    • +
    • U[]
    • +
    • void[]

    Where U is a base class of T.

    @@ -983,23 +985,16 @@

    Classes can be used as the KeyType. For this to work, the class definition must override the following member functions - of class Object -:

    + of class Object:

    -
    • hash_t toHash() -
    • -
    • int opEquals(Object) -
    • -
    • int opCmp(Object) -
    • +
      • hash_t toHash()
      • +
      • int opEquals(Object)
      • +
      • int opCmp(Object)
      -

      Note that the parameter to opCmp - and opEquals - is +

      Note that the parameter to opCmp and opEquals is of type - Object -, not the type of the class in which it is defined.

      + Object, not the type of the class in which it is defined.

      For example:

      @@ -1025,25 +1020,23 @@ }
    +

    The implementation may use either opEquals or opCmp or + both. Care should be taken so that the results of + opEquals and opCmp are consistent with each other when + the class objects are the same or not.

    +

    Using Structs or Unions as the KeyType

    Structs or unions can be used as the KeyType. For this to work, the struct or union definition must define the following member functions:

    -
    • hash_t toHash() -
    • -
    • int opEquals(S) - or int opEquals(S*) -
    • -
    • int opCmp(S) - or int opCmp(S*) -
    • +
      • hash_t toHash()
      • +
      • int opEquals(S) or int opEquals(S*)
      • +
      • int opCmp(S) or int opCmp(S*)
      -

      Note that the parameter to opCmp - and opEquals - +

      Note that the parameter to opCmp and opEquals can be either the struct or union type, or a pointer to the struct or untion type.

      @@ -1069,6 +1062,11 @@ }
    +

    The implementation may use either opEquals or opCmp or + both. Care should be taken so that the results of + opEquals and opCmp are consistent with each other when + the struct/union objects are the same or not.

    +

    Properties

    Properties for associative arrays are: diff -uNr dmd-0.177/dmd/html/d/ascii-table.html dmd-0.178/dmd/html/d/ascii-table.html --- dmd-0.177/dmd/html/d/ascii-table.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/ascii-table.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:31 2006 +
    Last update Sun Dec 10 22:56:57 2006
    diff -uNr dmd-0.177/dmd/html/d/attribute.html dmd-0.178/dmd/html/d/attribute.html --- dmd-0.177/dmd/html/d/attribute.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/attribute.html 2006-12-15 12:19:44.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:29 2006 +
    Last update Fri Dec 15 12:19:42 2006
    @@ -158,8 +158,9 @@ { DeclDefs }
    - Attributes are a way to modify one or more declarations. +

    Attributes are a way to modify one or more declarations. The general forms are: +

     attribute declaration;		affects the declaration
    @@ -177,7 +178,7 @@
     }
     
    - For attributes with an optional else clause: +

    For attributes with an optional else clause:

     attribute
    @@ -213,7 +214,7 @@
     	Pascal
     
    - D provides an easy way to call C functions and operating +

    D provides an easy way to call C functions and operating system API functions, as compatibility with both is essential. The LinkageType is case sensitive, and is meant to be extensible by the implementation (they are not keywords). @@ -222,27 +223,28 @@ C++ is reserved for future use. Implementation Note: for Win32 platforms, Windows and Pascal should exist. -

    +

    - C function calling conventions are +

    C function calling conventions are specified by: +

    extern (C):
     	int foo();	// call foo() with C conventions
     
    - D conventions are: +

    D conventions are:

    extern (D):
     
    - or: +

    or:

    extern:
     
    - Windows API conventions are: +

    Windows API conventions are:

    extern (Windows):
         void *VirtualAlloc(
    @@ -257,18 +259,19 @@
     
     
    AlignAttribute:
     	align
    -	align ) Integer )
    +	align ( Integer )
     
    - Specifies the alignment of struct members. align by itself +

    Specifies the alignment of struct members. align by itself sets it to the default, which matches the default member alignment of the companion C compiler. Integer specifies the alignment which matches the behavior of the companion C compiler when non-default alignments are used. -

    +

    - Matching the behavior of the companion C compiler can have some +

    Matching the behavior of the companion C compiler can have some surprising results, such as the following for Digital Mars C++: +

    struct S
     {   align(4) byte a;	// placed at offset 0
    @@ -276,9 +279,10 @@
     }
     
    - AlignAttribute is meant for C ABI compatiblity, which is not +

    AlignAttribute is meant for C ABI compatiblity, which is not the same thing as binary compatibility across diverse platforms. For that, use packed structs: +

    align (1) struct S
     {   byte a;	// placed at offset 0
    @@ -288,29 +292,31 @@
     }
     
    - A value of 1 means that no alignment is done; +

    A value of 1 means that no alignment is done; members are packed together. -

    +

    - Do not align references or pointers that were allocated +

    Do not align references or pointers that were allocated using NewExpression on boundaries that are not - a multipe of 4. The garbage collector assumes that pointers - and references to gc allocated objects will be on 4 + a multiple of size_t. The garbage collector assumes that pointers + and references to gc allocated objects will be on size_t byte boundaries. If they are not, undefined behavior will result. -

    +

    - AlignAttribute is ignored when applied to declarations +

    AlignAttribute is ignored when applied to declarations that are not structs or struct members. +

    Deprecated Attribute

    - It is often necessary to deprecate a feature in a library, +

    It is often necessary to deprecate a feature in a library, yet retain it for backwards compatibility. Such declarations can be marked as deprecated, which means that the compiler can be set to produce an error if any code refers to deprecated declarations: +

    deprecated
     {
    @@ -318,33 +324,34 @@
     }
     
    - Implementation Note: The compiler should have a switch +

    Implementation Note: The compiler should have a switch specifying if deprecated declarations should be compiled with out complaint or not. +

    Protection Attribute

    - Protection is an attribute that is one of +

    Protection is an attribute that is one of private, package, protected, public or export. -

    +

    - Private means that only members of the enclosing class can access +

    Private means that only members of the enclosing class can access the member, or members and functions in the same module as the enclosing class. Private members cannot be overridden. Private module members are equivalent to static declarations in C programs. -

    +

    - Package extends private so that package members can be accessed +

    Package extends private so that package members can be accessed from code in other modules that are in the same package. This applies to the innermost package only, if a module is in nested packages. -

    +

    - Protected means that only members of the enclosing class or any +

    Protected means that only members of the enclosing class or any classes derived from that class, or members and functions in the same module as the enclosing class, can access the member. @@ -353,22 +360,24 @@ that member can only be accessed for the object instance which is the 'this' object for the member function call. Protected module members are illegal. -

    +

    - Public means that any code within the executable can access the member. -

    +

    Public means that any code within the executable can access the member. +

    - Export means that any code outside the executable can access the +

    Export means that any code outside the executable can access the member. Export is analogous to exporting definitions from a DLL. +

    Const Attribute

    const
     
    - The const attribute declares constants that can be +

    The const attribute declares constants that can be evaluated at compile time. For example: +

    const int foo = 7;
     
    @@ -378,9 +387,10 @@
     }
     
    - A const declaration without an initializer must be initialized +

    A const declaration without an initializer must be initialized in a constructor (for class fields) or in a static constructor (for static class members, or module variable declarations). +

    const int x;
     const int y;
    @@ -425,10 +435,11 @@
     }
     
    - It is not an error to have const module variable declarations without +

    It is not an error to have const module variable declarations without initializers if there is no constructor. This is to support the practice of having modules serve only as declarations that are not linked in, the implementation of it will be in another module that is linked in. +

    Override Attribute

    @@ -436,12 +447,13 @@
    override
     
    - The override attribute applies to virtual functions. +

    The override attribute applies to virtual functions. It means that the function must override a function with the same name and parameters in a base class. The override attribute is useful for catching errors when a base class's member function gets its parameters changed, and all derived classes need to have their overriding functions updated. +

    class Foo
     {
    @@ -464,11 +476,12 @@
     
    static
     
    - The static attribute applies to functions and data. +

    The static attribute applies to functions and data. It means that the declaration does not apply to a particular instance of an object, but to the type of the object. In other words, it means there is no this reference. static is ignored when applied to other declarations. +

    class Foo
     {
    diff -uNr dmd-0.177/dmd/html/d/builtin.html dmd-0.178/dmd/html/d/builtin.html
    --- dmd-0.177/dmd/html/d/builtin.html	2006-12-09 00:40:30.000000000 +0100
    +++ dmd-0.178/dmd/html/d/builtin.html	2006-12-10 22:56:58.000000000 +0100
    @@ -32,7 +32,7 @@
     	
     	
     
    -	
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:57 2006
    @@ -149,21 +149,13 @@
    • basic_string -
    • vector -
    • valarray -
    • deque -
    • slice_array -
    • gslice_array -
    • mask_array -
    • indirect_array -
    Fixing the builtin array support means the need for each of these @@ -176,16 +168,11 @@ This starts with having an array literal, and follows with some new operators specific to arrays. A library array implementation has to make due with overloading existing operators. - The indexing operator, a[i] -, it shares with C++. - Added are the array concatenation operator ~ -, array append operator - ~= -, array slice operator a[i..j] -, + The indexing operator, a[i], it shares with C++. + Added are the array concatenation operator ~, array append operator + ~=, array slice operator a[i..j], and the array vector operator - a[] -. + a[].

    The ~ and ~= concatenation operators resolve a problem that comes @@ -220,10 +207,8 @@

    Associative Arrays

    The main benefit for this is, once again, syntactic sugar. - An associative array keying off of a type T - and storing an - int - value is naturally written + An associative array keying off of a type T and storing an + int value is naturally written as:
    int[T] foo;
    diff -uNr dmd-0.177/dmd/html/d/changelog1.html dmd-0.178/dmd/html/d/changelog1.html
    --- dmd-0.177/dmd/html/d/changelog1.html	2006-12-09 00:40:30.000000000 +0100
    +++ dmd-0.178/dmd/html/d/changelog1.html	2006-12-15 12:19:44.000000000 +0100
    @@ -32,7 +32,7 @@
     	
     	
     
    -	
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Fri Dec 15 12:19:43 2006
    @@ -376,7 +376,7 @@
  • Download - + D compiler for Win32 and x86 linux
  • tech support
  • @@ -387,7 +387,8 @@

    What's New for - D 0.139 + D 0.139 +

    @@ -404,7 +405,8 @@

    What's New for - D 0.138 + D 0.138 +

    @@ -441,8 +443,7 @@
  • Fixed D.bugs/5198
  • Fixed D.bugs/5199
  • Fixed Linux C ABI compatibility bug with returning structs - from extern (C) - functions. this can break + from extern (C) functions. this can break existing code.
  • @@ -450,7 +451,8 @@

    What's New for - D 0.137 + D 0.137 +

    @@ -485,7 +487,8 @@

    What's New for - D 0.136 + D 0.136 +

    @@ -519,7 +522,8 @@

    What's New for - D 0.135 + D 0.135 +

    @@ -546,7 +550,8 @@

    What's New for - D 0.134 + D 0.134 +

    @@ -577,7 +582,8 @@

    What's New for - D 0.133 + D 0.133 +

    @@ -609,7 +615,8 @@

    What's New for - D 0.132 + D 0.132 +

    @@ -627,7 +634,8 @@

    What's New for - D 0.131 + D 0.131 +

    @@ -651,7 +659,8 @@

    What's New for - D 0.130 + D 0.130 +

    @@ -705,7 +714,7 @@

    What's New for - D 0.129 + D 0.129

    Aug 5, 2005 @@ -736,7 +745,7 @@

    What's New for - D 0.128 + D 0.128

    Jul 10, 2005 @@ -777,7 +786,7 @@

    What's New for - D 0.127 + D 0.127

    Jun 16, 2005 @@ -806,7 +815,7 @@

    What's New for - D 0.126 + D 0.126

    Jun 7, 2005 @@ -826,10 +835,8 @@ The IsExpressions are significantly more general and powerful.
  • Added VoidInitializers. -
  • delete aa[key] - is now deprecated, use - aa.remove(key) - instead. +
  • delete aa[key] is now deprecated, use + aa.remove(key) instead.
  • Added non-static nested classes.
  • Added anonymous non-static nested classes. @@ -870,7 +877,7 @@

    What's New for - D 0.125 + D 0.125

    May 20, 2005 @@ -892,7 +899,7 @@

    What's New for - D 0.124 + D 0.124

    May 19, 2005 @@ -924,7 +931,7 @@

    What's New for - D 0.123 + D 0.123

    May 11, 2005 @@ -968,7 +975,7 @@

    What's New for - D 0.122 + D 0.122

    May 3, 2005 @@ -1006,7 +1013,7 @@

    What's New for - D 0.121 + D 0.121

    Apr 15, 2005 @@ -1071,7 +1078,7 @@

    What's New for - D 0.120 + D 0.120

    Apr 6, 2005 @@ -1079,8 +1086,7 @@

    New/Changed Features

      -
    • In -release - builds implicit switch defaults, +
    • In -release builds implicit switch defaults, implicit return statements, and assert(0) expressions are replaced with HLT instructions.
    • Renamed -gt command line switch that invokes the profiler @@ -1154,7 +1160,7 @@

      What's New for - D 0.119 + D 0.119

      Mar 18, 2005 @@ -1206,7 +1212,7 @@

      What's New for - D 0.118 + D 0.118

      Mar 12, 2005 @@ -1221,7 +1227,7 @@

      What's New for - D 0.117 + D 0.117

      Mar 10, 2005 @@ -1230,11 +1236,9 @@

      New/Changed Features

      • Added pragma(lib, "library name"); -
      • cent and ucent are now keywords, to ensure they stay reserved. -
      • version=all - cannot be explicitly set; +
      • version=all cannot be explicitly set; all is always on anyway.
      @@ -1264,7 +1268,8 @@

      What's New for - D 0.116 + D 0.116 +

      @@ -1290,9 +1295,7 @@
    • If a module statement name is used with a package prefix, as in:
       	module foo.bar;
      - then bar - is not in scope, one must use foo.bar -. + then bar is not in scope, one must use foo.bar.

    Bugs Fixed

    @@ -1311,7 +1314,7 @@

    What's New for - D 0.115 + D 0.115

    Feb 28, 2005 @@ -1325,7 +1328,7 @@

    What's New for - D 0.114 + D 0.114

    Feb 27, 2005 @@ -1383,7 +1386,7 @@

    What's New for - D 0.113 + D 0.113

    Feb 12, 2005 @@ -1421,7 +1424,7 @@

    What's New for - D 0.112 + D 0.112

    Jan 26, 2005 @@ -1440,7 +1443,7 @@

    What's New for - D 0.111 + D 0.111

    Jan 15, 2005 @@ -1485,7 +1488,7 @@

    What's New for - D 0.110 + D 0.110

    Dec 30, 2004 @@ -1516,7 +1519,7 @@

    What's New for - D 0.109 + D 0.109

    Dec 5, 2004 @@ -1542,7 +1545,7 @@

    What's New for - D 0.108 + D 0.108

    Nov 30, 2004 @@ -1555,7 +1558,7 @@

    What's New for - D 0.107 + D 0.107

    Nov 29, 2004 @@ -1571,8 +1574,7 @@ for many double lookups.
  • .offset property is now deprecated, use .offsetof instead. This makes for better compatibility with C and fewer conflicts - with offset - as a field name. + with offset as a field name.
  • Added .ptr property to arrays, which is handier and more typesafe than casting an array to a pointer.
  • Added Ben Hinkle's changes to std.stream: @@ -1610,7 +1612,7 @@

    What's New for - D 0.106 + D 0.106

    Nov 9, 2004 @@ -1648,7 +1650,7 @@

    What's New for - D 0.105 + D 0.105

    Oct 28, 2004 @@ -1682,7 +1684,7 @@

    What's New for - D 0.104 + D 0.104

    Oct 21, 2004 @@ -1693,7 +1695,7 @@
    -

    What's New for D 0.103

    +

    What's New for D 0.103

    Oct 20, 2004 @@ -1713,7 +1715,7 @@
    -

    What's New for D 0.102

    +

    What's New for D 0.102

    Sep 20, 2004 @@ -1850,7 +1852,6 @@
    • One can now 'new' a scalar type, for example:
      int* p = new int; -

    Bugs Fixed

    @@ -1938,7 +1939,7 @@
  • Fixed mishandling of out parameters in variadic functions.
  • Fixed problem of undefined symbols at link time when templates are expanded in interface declarations. -
  • Template default arguments for parameters now are 'lazilly' +
  • Template default arguments for parameters now are 'lazily' semantically analyzed, which means they can refer to previous template argument types.
  • Fixed DMD GPF when trying to index a mixin with []. @@ -2183,7 +2184,6 @@

    Bugs Fixed

    • An error is now issued when the argument to delete - is a COM interface object.
    • Incorporated Antonio Monteiro's fixes for std.date and std.zip.
    • Error now diagnosed when EnumBaseType is not integral. @@ -2342,11 +2342,8 @@
    • Added pragmas.
    • Added expression lists to case statements. -
    • Added goto default; - and goto case; - and +
    • Added goto default; and goto case; and goto case Expression; - for use in switch statements.
    • Added template alias parameters. @@ -2476,13 +2473,11 @@

      Bugs Fixed

      • Fixed bug with in and out instructions in inline assembler. -
      • Fixed speed problem with %.*s - printf format. +
      • Fixed speed problem with %.*s printf format.
      • Fixed problem with foreach over array of arrays or structs.
      • Fixed compiler error with array rehash.
      • Now correctly issues error on self-initializations like:
        - int a = a; -
        + int a = a;
      • Fixed problem converting "string" to char[], it should be an exact conversion, not an implicit conversion.
      @@ -2643,15 +2638,10 @@

      linux version

        -
      • dmd.conf - now needs to be installed as - /etc/dmd.conf -. -
      • phobos.a - has been renamed as libphobos.a - - and been placed in the /usr/lib - directory. +
      • dmd.conf now needs to be installed as + /etc/dmd.conf. +
      • phobos.a has been renamed as libphobos.a + and been placed in the /usr/lib directory.
      • dmd will now do the link step automatically.
      • The bad section name bug is hopefully fixed.
      @@ -2797,10 +2787,8 @@
      • The argument to a with statement can now be a template instance. -
      • The inline asm for FCOMI/FCOMIP/FUCOMI/FUCOMIP - can now - accept the ST,ST(i) - form of the instruction to match the +
      • The inline asm for FCOMI/FCOMIP/FUCOMI/FUCOMIP can now + accept the ST,ST(i) form of the instruction to match the Intel documentation.
      • Fixed numerous minor bugs.
      @@ -2826,10 +2814,8 @@
      • To convert to type bit now requires an explicit cast, - rather than implicit. The conversion (cast(bit)i) - is - now performed as (i?true:false) -. + rather than implicit. The conversion (cast(bit)i) is + now performed as (i?true:false).
      • Added library functions string.toString(). @@ -2910,7 +2896,9 @@
        -

        What's New for D 0.44

        + +

        What's New for D 0.44

        + Oct 1, 2002 @@ -2921,7 +2909,9 @@
        -

        What's New for D 0.43

        + +

        What's New for D 0.43

        + Sep 28, 2002 diff -uNr dmd-0.177/dmd/html/d/changelog.html dmd-0.178/dmd/html/d/changelog.html --- dmd-0.177/dmd/html/d/changelog.html 2006-12-09 01:16:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/changelog.html 2006-12-23 20:43:42.000000000 +0100 @@ -32,7 +32,7 @@
      -
      Last update Sat Dec 9 01:16:27 2006 +
      Last update Sat Dec 23 20:43:40 2006
      @@ -194,6 +194,8 @@
        +
      • What's new for D 0.178
      • +
      • What's new for D 0.177
      • What's new for D 0.176
      • @@ -283,6 +285,64 @@
        +

        + What's New for + D 0.178 +

        + + +Dec 23, 2006 + +

        New/Changed Features

        + +
        • Implemented Named Return Value Optimization
        • +
        • If the first element of an array literal is a static array, + it is converted to a dynamic array.
        • +
        • Empty ; no longer allowed after conditional statements, + see Bugzilla 576.
        • +
        + +

        Bugs Fixed

        + +
        • Fixed Bugzilla 39: ArrayMemberInitialization, StructMemberInitializer inconsistencies from dmd's behavior
        • +
        • Fixed Bugzilla 40: DecimalFloat spec doesn't match dmd behavior
        • +
        • Fixed Bugzilla 238: Cannot initialise const field from foreach loop on associative array
        • + +
        • Fixed Bugzilla 265: Selective import from renamed import behaves strangely
        • +
        • Fixed Bugzilla 576: version.html - ConditionalStatement grammar doesn't make sense
        • +
        • Fixed Bugzilla 577: statement.html - NonEmptyStatement grammar lists DebugStatement and VersionStatement, which are not defined
        • +
        • Fixed Bugzilla 612: Associative arrays ignore opEquals, contrary to the spec
        • +
        • Fixed Bugzilla 630: Obscure, unimplemented features related to in/out contracts
        • +
        • Fixed Bugzilla 631: Spelling errors in DMD distribution
        • +
        • Fixed Bugzilla 634: writef doesn't work on enums
        • +
        • Fixed Bugzilla 635: regression: looping "Error: outer class Outer 'this' needed to 'new' nested class Inner"
        • +
        • Fixed Bugzilla 650: Assertion failure: '0' on line 774 in file 'expression.c'
        • +
        • Fixed Bugzilla 651: Assertion failure: 'global.errors' on line 2622 in file 'template.c'
        • +
        • Fixed Bugzilla 654: Const string member using implicit type inference gives garbage in certain situation
        • +
        • Fixed Bugzilla 661: Error using a zero-init struct's init property
        • +
        • Fixed Bugzilla 663: Slice assignment does not bounds check when it should
        • +
        • Fixed Bugzilla 665: missing functions in std.c.linux.linux
        • +
        • Fixed Bugzilla 667: incorrect value for std.socket.SocketShutdown.BOTH
        • +
        • Fixed Bugzilla 669: (a == b) misuses opCmp and opEquals
        • +
        • Fixed Bugzilla 672: Compiler endless loop with nested class object
        • +
        • Fixed Bugzilla 673: ABI as documented is 32 bit specific.. how about 64 bits?
        • +
        • Fixed Bugzilla 681: Array -- Implicit type doc updates needed
        • +
        • Fixed Bugzilla 682: dmd segfault with vararg template
        • +
        • Fixed Bugzilla 683: New: dmd segv, this ain't the same as bug 682
        • +
        • Fixed Bugzilla 684: dmd should compile this
        • +
        • Fixed Bugzilla 685: dmd assertion failure
        • +
        • Fixed Bugzilla 686: [Regression] opCast of a struct or union is called in nonsensical circumstances
        • +
        • Fixed Bugzilla 687: DDoc doesn't document anonymous enums
        • +
        • Fixed Bugzilla 688: Implicit function template match doesn't work for classes
        • +
        • Fixed D.announce/6072 +
        • +
        • Fixed D/45058 items 1, 2 and 4
        • +
        • Fixed D.bugs/6300: Assertion failure: '0' on line 704 in file 'expression.c'
        • +
        • Fixed c++/5355
        • +
        + +
        +

        What's New for D 0.177 @@ -473,15 +533,11 @@
      • Improved the statement grammar thanks to Stewart Gordon.
      • Added DMD switch -v1 for D language 1.0 compatibility.
      • deprecated === and !== no longer allowed
      • -
      • deprecated iftype - no longer allowed
      • -
      • deprecated on_scope_xxxx - no longer allowed
      • +
      • deprecated iftype no longer allowed
      • +
      • deprecated on_scope_xxxx no longer allowed
      • deprecated 'l' numeric literal suffix no longer allowed
      • -
      • deprecated if (v; e) - no longer allowed
      • -
      • deprecated instance - no longer allowed
      • +
      • deprecated if (v; e) no longer allowed
      • +
      • deprecated instance no longer allowed
      • scope can now be used for RAII declarations; use auto for type inference.
      @@ -724,8 +780,7 @@ NewExpression.
    • Added array literals.
    • std.format will now work with struct arguments as long - as they define a char[] toString() - member function.
    • + as they define a char[] toString() member function.

    Bugs Fixed

    @@ -1009,8 +1064,7 @@

    Bugs Fixed

    • Fixed Bugzilla 50, but the o must appear as - o.new Inner -
    • + o.new Inner
    • Fixed Bugzilla 139
    • Fixed Bugzilla 148
    • Fixed Bugzilla 149
    • @@ -1357,10 +1411,8 @@
      • Changed on_scope_exit to scope(exit)
      • Changed on_scope_success to scope(success)
      • Changed on_scope_failure to scope(failure)
      • -
      • Changed IfStatement to allow: (auto v = expression) -, - and (type v = expression) - forms.
      • +
      • Changed IfStatement to allow: (auto v = expression), + and (type v = expression) forms.
      • & | ^ &= |= ^= ! && || ?: are now only operators allowed on bools
      • opSliceAssign now overloads assignment to a slice.
      • @@ -1540,8 +1592,7 @@

        Bugs Fixed

        • Constant folding of string==string now works.
        • -
        • Constant folding of length - for char literals now works.
        • +
        • Constant folding of length for char literals now works.
        • Constant folding of char literals appending chars now works.
        • Constant folding of char literal slices now works.
        • Fixed D.bugs/6003
        • diff -uNr dmd-0.177/dmd/html/d/class.html dmd-0.178/dmd/html/d/class.html --- dmd-0.177/dmd/html/d/class.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/class.html 2006-12-15 12:19:44.000000000 +0100 @@ -32,7 +32,7 @@
        -
        Last update Sat Dec 9 00:40:27 2006 +
        Last update Fri Dec 15 12:19:42 2006
        @@ -527,8 +527,7 @@ A static constructor is defined as a function that performs initializations before the - main() - function gets control. Static constructors are used to + main() function gets control. Static constructors are used to initialize static class members with values that cannot be computed at compile time. @@ -563,8 +562,7 @@ initializations, and it is not possible to read a value that has not been initialized. Dynamic initialization is performed by a static constructor, defined with - a special syntax static this() -. + a special syntax static this().
        class Foo
         {
        @@ -580,10 +578,8 @@
         }
         
        - static this() - is called by the startup code before - main() - is called. If it returns normally + static this() is called by the startup code before + main() is called. If it returns normally (does not throw an exception), the static destructor is added to the list of functions to be called on program termination. @@ -620,8 +616,7 @@
  • A static destructor is defined as a special static function with the - syntax static ~this() -. + syntax static ~this().
    class Foo
     {
    @@ -715,8 +710,7 @@
     
    Invariants contain assert expressions, and so when they fail, - they throw a AssertError -s. + they throw a AssertErrors. Class invariants are inherited, that is, any class invariant is implicitly anded with the invariants of its base classes. @@ -754,7 +748,6 @@ cause the unittest test code to be compiled and incorporated into the resulting executable. The unittest code gets run after static initialization is run and before the main() - function is called.

    @@ -802,8 +795,7 @@ set to the size in bytes of the memory to be allocated for the instance. The allocator must allocate the memory and return it as a - void* -. + void*. If the allocator fails, it must not return a null, but must throw an exception. If there is more than one parameter to the allocator, the @@ -852,8 +844,7 @@

    is called a class deallocator. - The deallocator must have exactly one parameter of type void* -. + The deallocator must have exactly one parameter of type void*. Only one can be specified for a class. When a delete expression: diff -uNr dmd-0.177/dmd/html/d/code_coverage.html dmd-0.178/dmd/html/d/code_coverage.html --- dmd-0.177/dmd/html/d/code_coverage.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/code_coverage.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:57 2006
    @@ -294,8 +294,7 @@ sieve
    -

    The output file will be created called sieve.lst -, the contents of +

    The output file will be created called sieve.lst, the contents of which are:

           |/* Eratosthenes Sieve prime number calculation. */
    @@ -336,13 +335,11 @@
     

    There are 3 lines with an exection count -of 1, these were each executed once. The declaration line for i, prime -, +of 1, these were each executed once. The declaration line for i, prime, etc., has 5 because there are 5 declarations, and the initialization of each declaration counts as one statement.

    -

    The first for - loop shows 22. This is the sum of the 3 parts +

    The first for loop shows 22. This is the sum of the 3 parts of the for header. If the for header is broken up into 3 lines, the data is similarly divided:

    @@ -353,11 +350,8 @@

    which adds up to 22.

    -

    e1&&e2 - and e1||e2 - expressions conditionally -execute the rvalue e2 -. +

    e1&&e2 and e1||e2 expressions conditionally +execute the rvalue e2. Therefore, the rvalue is treated as a separate statement with its own counter:

    @@ -380,11 +374,8 @@ |}
    -

    Similarly, for the e?e1:e2 - expressions, e1 - and -e2 - are treated as separate statements.

    +

    Similarly, for the e?e1:e2 expressions, e1 and +e2 are treated as separate statements.

    Controlling the Coverage Analyser

    diff -uNr dmd-0.177/dmd/html/d/comparison.html dmd-0.178/dmd/html/d/comparison.html --- dmd-0.177/dmd/html/d/comparison.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/comparison.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Tue Dec 5 18:54:31 2006 +
    Last update Sun Dec 10 22:56:57 2006
    diff -uNr dmd-0.177/dmd/html/d/cppcomplex.html dmd-0.178/dmd/html/d/cppcomplex.html --- dmd-0.177/dmd/html/d/cppcomplex.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/cppcomplex.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:28 2006 +
    Last update Sun Dec 10 22:56:54 2006
    diff -uNr dmd-0.177/dmd/html/d/cppdbc.html dmd-0.178/dmd/html/d/cppdbc.html --- dmd-0.177/dmd/html/d/cppdbc.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/cppdbc.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Sat Dec 9 00:40:27 2006 +
    Last update Sun Dec 10 22:56:54 2006
    @@ -145,27 +145,20 @@

    Contract Programming in C++

    -

    The assert - Macro

    +

    The assert Macro

    - C++ does have the basic assert - macro, which tests its argument - and if it fails, aborts the program. assert - can be turned - on and off with the NDEBUG - macro. + C++ does have the basic assert macro, which tests its argument + and if it fails, aborts the program. assert can be turned + on and off with the NDEBUG macro.

    - assert - does not know anything about class invariants, + assert does not know anything about class invariants, and does not throw an exception when it fails. It just aborts - the program after writing a message. assert - relies on + the program after writing a message. assert relies on a macro text preprocessor to work.

    - assert - is where explicit support for DbC in Standard C++ + assert is where explicit support for DbC in Standard C++ begins and ends.

    Class Invariants

    @@ -244,10 +237,8 @@ }
    - There's an additional complication with A::foo() -. Upon every - normal exit from the function, the invariant() - should be + There's an additional complication with A::foo(). Upon every + normal exit from the function, the invariant() should be called. This means that code that looks like: @@ -326,19 +317,14 @@
    If the preconditions and postconditions consist of nothing - more than assert - macros, the whole doesn't need to - be wrapped in a #ifdef - pair, since a good C++ compiler will - optimize the whole thing away if the assert -s are turned off. + more than assert macros, the whole doesn't need to + be wrapped in a #ifdef pair, since a good C++ compiler will + optimize the whole thing away if the asserts are turned off.

    - But suppose foo() - sorts an array, and the postcondition needs + But suppose foo() sorts an array, and the postcondition needs to walk the array and verify that it really is sorted. Now - the shebang needs to be wrapped in #ifdef -: + the shebang needs to be wrapped in #ifdef:

    void foo()
     {
    @@ -353,15 +339,12 @@
     
    (One can make use of the C++ rule that templates are only - instantiated when used can be used to avoid the #ifdef -, by + instantiated when used can be used to avoid the #ifdef, by putting the conditions into a template function referenced - by the assert -.) + by the assert.)

    - Let's add a return value to foo() - that needs to be checked in + Let's add a return value to foo() that needs to be checked in the postconditions. In D:

    int foo()
    @@ -402,8 +385,7 @@
     }
     
    - Now add a couple parameters to foo() -. In D: + Now add a couple parameters to foo(). In D:
    int foo(int a, int b)
         in { ...preconditions... }
    @@ -476,8 +458,7 @@
     }
     
    - The semantics for a call to B.foo() - are: + The semantics for a call to B.foo() are:
    • Either Apreconditions or Bpreconditions must be satisfied. @@ -539,20 +520,16 @@
    Something interesting has happened here. The preconditions can - no longer be done using assert -, since the results need + no longer be done using assert, since the results need to be OR'd together. I'll leave as a reader exercise adding - in a class invariant, function return values for foo() -, + in a class invariant, function return values for foo(), and parameters - for foo() -. + for foo().

    Conclusion

    These C++ techniques can work up to a point. But, aside from - assert -, they are not standardized and so will vary from + assert, they are not standardized and so will vary from project to project. Furthermore, they require much tedious adhesion to a particular convention, and add significant clutter to the code. Perhaps that's why it's rarely seen in practice. diff -uNr dmd-0.177/dmd/html/d/cppstrings.html dmd-0.178/dmd/html/d/cppstrings.html --- dmd-0.177/dmd/html/d/cppstrings.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/cppstrings.html 2006-12-10 22:56:56.000000000 +0100 @@ -33,7 +33,7 @@ -
    Last update Sat Dec 9 00:40:26 2006 +
    Last update Sun Dec 10 22:56:54 2006
    @@ -243,12 +243,9 @@ char[] s1; foo(s1);
    -

    although for this to work where foo - expects a 0 terminated - string, s1 - must have a terminating 0. Alternatively, the - function std.string.toStringz - will ensure it:

    +

    although for this to work where foo expects a 0 terminated + string, s1 must have a terminating 0. Alternatively, the + function std.string.toStringz will ensure it:

    void foo(char*);
     char[] s1;
    diff -uNr dmd-0.177/dmd/html/d/cpptod.html dmd-0.178/dmd/html/d/cpptod.html
    --- dmd-0.177/dmd/html/d/cpptod.html	2006-12-09 00:40:28.000000000 +0100
    +++ dmd-0.178/dmd/html/d/cpptod.html	2006-12-10 22:56:56.000000000 +0100
    @@ -32,7 +32,7 @@
     	
     	
     
    -	
    Last update Sat Dec 9 00:40:26 2006 +
    Last update Sun Dec 10 22:56:54 2006
    @@ -331,8 +331,7 @@ Sometimes two classes are tightly related but not by inheritance, but need to access each other's private members. This is done - using friend - declarations: + using friend declarations:
    class A
     {
    @@ -391,8 +390,7 @@
     int abc(A p) { return p.a; }
     
    - The private - attribute prevents other modules from + The private attribute prevents other modules from accessing the members.
    @@ -433,8 +431,7 @@ The compiler automatically interprets all the <, <=, > and >= - operators in terms of the cmp - function, as well + operators in terms of the cmp function, as well as handling the cases where the left operand is not an object reference.

    @@ -503,7 +500,6 @@ of and freeing memory. This is handled automatically in D by the garbage collector. The second common resources used are semaphores and locks, handled automatically with D's synchronized - declarations and statements.

    @@ -828,8 +824,7 @@

    This template relies on the - SFINAE - (Substitution Failure Is Not An Error) principle. + SFINAE principle. Why it works is a fairly advanced template topic.

    The D Way

    diff -uNr dmd-0.177/dmd/html/d/ctod.html dmd-0.178/dmd/html/d/ctod.html --- dmd-0.177/dmd/html/d/ctod.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/ctod.html 2006-12-10 22:56:56.000000000 +0100 @@ -33,7 +33,7 @@ -
    Last update Sat Dec 9 00:40:26 2006 +
    Last update Sun Dec 10 22:56:54 2006
    @@ -709,8 +709,7 @@ It's done through a command line switch which affects the entire program, and woe results if any modules or libraries didn't get - recompiled. To address this, #pragma -s are used: + recompiled. To address this, #pragmas are used:
    #pragma pack(1) 
     struct ABC 
    @@ -1074,8 +1073,7 @@
     
    There are 4 names to remember: Handle, HANDLE_INIT, - struct Handle__, value -. + struct Handle__, value.

    The D Way

    @@ -1091,8 +1089,7 @@ To handle a default value, add an initializer to the typedef, - and refer to it with the .init - property: + and refer to it with the .init property:
    typedef void* Handle = cast(void*)(-1);
     Handle h;
    @@ -1101,8 +1098,7 @@
         ...
     
    - There's only one name to remember: Handle -. + There's only one name to remember: Handle.

    Comparing structs

    @@ -1287,11 +1283,9 @@

    To make this work, a helper function membersearchx - is needed to recursively walk the trees. The helper function needs to read and write some context outside of the trees, so a custom struct Paramblock - is created and a pointer to it is used to maximize efficiency.

    struct Symbol
    @@ -1401,10 +1395,7 @@
     j = (unsigned)i >> 3;
     
    - If i - is an int -, this works fine. But if i - is + If i is an int, this works fine. But if i is of a type created with typedef,
    myint i, j;
    @@ -1412,9 +1403,7 @@
     j = (unsigned)i >> 3;
     
    - and myint - happens to be a long int -, then the cast to + and myint happens to be a long int, then the cast to unsigned will silently throw away the most significant bits, corrupting the answer. @@ -1448,8 +1437,7 @@

    A generic context pointer is also needed, represented here by - void *p -. The example here is of a trivial container + void *p. The example here is of a trivial container class that holds an array of ints, and a user of that container that computes the maximum of those ints. @@ -1565,8 +1553,7 @@ There are two problems with this. The first is that the - sum - function needs to know how many arguments were + sum function needs to know how many arguments were supplied. It has to be explicitly written, and it can get out of sync with respect to the actual number of arguments written. diff -uNr dmd-0.177/dmd/html/d/dbc.html dmd-0.178/dmd/html/d/dbc.html --- dmd-0.177/dmd/html/d/dbc.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/dbc.html 2006-12-15 02:20:44.000000000 +0100 @@ -32,7 +32,7 @@ -

    Last update Sat Dec 9 00:40:27 2006 +
    Last update Fri Dec 15 02:20:42 2006
    @@ -242,57 +242,28 @@ In an out statement, result is initialized and set to the return value of the function. -

    - The compiler can be adjusted to verify that every in and inout parameter is referenced - in the in { }, - and every out and inout parameter is referenced in the out { }. -

    - The in-out statement can also be used inside a function, for example, it can be used - to check the results of a loop: -

    in
    -{
    -    assert(j == 0);
    -}
    -out
    -{
    -    assert(j == 10);
    -}
    -body
    -{
    -    for (i = 0; i < 10; i++)
    -	j++;
    -}
    -
    - This is not implemented at this time.

    In, Out and Inheritance

    If a function in a derived class overrides a function in its super class, then only one of - the in - contracts of the function and its base functions + the in contracts of the function and its base functions must be satisfied. Overriding functions then becomes a process of loosening the in - contracts.

    -

    A function without an in - contract means that any values +

    A function without an in contract means that any values of the function parameters are allowed. This implies that if any - function in an inheritance heirarchy has no in - contract, - then in - contracts on functions overriding it have no useful + function in an inheritance hierarchy has no in contract, + then in contracts on functions overriding it have no useful effect.

    -

    Conversely, all of the out - contracts needs to be satisfied, +

    Conversely, all of the out contracts needs to be satisfied, so overriding functions becomes a processes of tightening the out - contracts.

    diff -uNr dmd-0.177/dmd/html/d/dcompiler.html dmd-0.178/dmd/html/d/dcompiler.html --- dmd-0.177/dmd/html/d/dcompiler.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/dcompiler.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:56 2006
    @@ -203,19 +203,15 @@
    \dmd\src\phobos\ -
    D runtime library source
    \dmd\src\dmd\ -
    D compiler front end source under dual (GPL and Artistic) license
    \dmd\html\d\ -
    Documentation
    \dmd\samples\d\ -
    Sample D programs
    @@ -228,19 +224,15 @@
    \dmd\bin\dmd.exe -
    D compiler executable
    \dmd\bin\shell.exe -
    Simple command line shell
    \dmd\bin\sc.ini -
    Global compiler settings
    \dmd\lib\phobos.lib -
    D runtime library
    @@ -268,14 +260,10 @@ they are run from a console window. Switch to the root directory. Unzip the files in the root directory. - dmd.zip - will create - a \dmd - directory with all the files in it. - dmc.zip - will create - a \dm - directory with all the files in it. + dmd.zip will create + a \dmd directory with all the files in it. + dmc.zip will create + a \dm directory with all the files in it.

    A typical session might look like: @@ -292,8 +280,7 @@

    \dmd\bin\shell all.sh
     
    - in the \dmd\samples\d - directory for several small examples. + in the \dmd\samples\d directory for several small examples.

    Compiler Arguments and Switches

    @@ -379,7 +366,6 @@
    pass linkerflag to the linker, for example, /ma/li -
    -nofloat
    Prevents emission of __fltused reference in object files, even if floating point code is present. @@ -497,8 +483,7 @@ conflicting use of environment variables.

    - Environment variables follow the [Environment] - section + Environment variables follow the [Environment] section heading, in NAME=value pairs. The NAMEs are treated as upper case. Comments are lines that start with ;. @@ -535,26 +520,19 @@

    /dmd/bin/dmd -
    D compiler executable
    /dmd/bin/dumpobj -
    Elf file dumper
    /dmd/bin/obj2asm -
    Elf file disassembler
    /dmd/bin/dmd.conf - -
    Global compiler settings (copy to /etc/dmd.conf -) +
    Global compiler settings (copy to /etc/dmd.conf)
    /dmd/lib/libphobos.a - -
    D runtime library (copy to /usr/lib/libphobos.a -) +
    D runtime library (copy to /usr/lib/libphobos.a)
    @@ -577,18 +555,14 @@
  • Unzip the archive into your home directory. It will create - a ~/dmd - directory with all the files in it. + a ~/dmd directory with all the files in it. All the tools are command line tools, which means they are run from a console window. -
  • Edit the file ~/dmd/bin/dmd.conf - to put the path in to +
  • Edit the file ~/dmd/bin/dmd.conf to put the path in to where the phobos source files are. -
  • Copy dmd.conf - to /etc -: +
  • Copy dmd.conf to /etc:
    cp dmd/bin/dmd.conf /etc
     
    @@ -598,14 +572,11 @@
    chmod u+x dmd/bin/dmd dmd/bin/obj2asm dmd/bin/dumpobj
     
    -
  • Put dmd/bin - on your PATH, +
  • Put dmd/bin on your PATH, or copy the linux executables to /usr/local/bin - -
  • Copy the library to /usr/lib -: +
  • Copy the library to /usr/lib:
    cp dmd/lib/libphobos.a /usr/lib
     
    @@ -690,7 +661,6 @@
    -Llinkerflag
    pass linkerflag to the linker, for example, -M -
    -O
    optimize
    -o-
    @@ -777,8 +747,7 @@ conflicting use of environment variables.

    -

    Environment variables follow the [Environment] - section +

    Environment variables follow the [Environment] section heading, in NAME=value pairs. The NAMEs are treated as upper case. Comments are lines that start with ;. @@ -800,7 +769,6 @@ will cause a segment violation.

  • The configuration file is /etc/dmd.conf -
    diff -uNr dmd-0.177/dmd/html/d/ddoc.html dmd-0.178/dmd/html/d/ddoc.html --- dmd-0.177/dmd/html/d/ddoc.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/ddoc.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:57 2006
    @@ -270,7 +270,6 @@

    If a documentation comment for a declaration consists only of the identifier ditto - then the documentation comment for the previous declaration at the same declaration scope is applied to this declaration as well.

    @@ -566,10 +565,10 @@

    /** Example of embedded HTML:
    - *   <ol>
    + *   
      * <li> <a href="www.digitalmars.com">Digital Mars</a> * <li> <a href="www.classicempire.com">Empire</a> - * </ol> + *
    */
    diff -uNr dmd-0.177/dmd/html/d/declaration.html dmd-0.178/dmd/html/d/declaration.html --- dmd-0.177/dmd/html/d/declaration.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/declaration.html 2006-12-15 00:15:06.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:29 2006 +
    Last update Fri Dec 15 00:15:04 2006
    @@ -268,13 +268,16 @@ Initializer: void + NonVoidInitializer + +NonVoidInitializer: AssignExpression ArrayInitializer StructInitializer ArrayInitializer: - [ ArrayMemberInitializations ] [ ] + [ ArrayMemberInitializations ] ArrayMemberInitializations: ArrayMemberInitialization @@ -282,8 +285,8 @@ ArrayMemberInitialization , ArrayMemberInitializations ArrayMemberInitialization: - AssignExpression - AssignExpression : AssignExpression + NonVoidInitializer + AssignExpression : NonVoidInitializer StructInitializer: { } @@ -295,8 +298,8 @@ StructMemberInitializer , StructMemberInitializers StructMemberInitializer: - AssignExpression - Identifier : AssignExpression + NonVoidInitializer + Identifier : NonVoidInitializer AutoDeclaration: StorageClasses Identifier = AssignExpression ; @@ -359,7 +362,7 @@

    Implicit Type Inference

    If a declaration starts with a StorageClass and has - an Initializer from which the type can be inferred, + a NonVoidInitializer from which the type can be inferred, the type on the declaration can be omitted.
    static x = 3;	   // x is type int
    @@ -371,7 +374,7 @@
     auto c = new C();  // c is a handle to an instance of class C
     
    - The Initializer cannot contain forward references + The NonVoidInitializer cannot contain forward references (this restriction may be removed in the future). The implicitly inferred type is statically bound to the declaration at compile time, not run time. diff -uNr dmd-0.177/dmd/html/d/dlinks.html dmd-0.178/dmd/html/d/dlinks.html --- dmd-0.177/dmd/html/d/dlinks.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/dlinks.html 2006-12-10 22:56:56.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Tue Dec 5 18:54:28 2006 +
    Last update Sun Dec 10 22:56:54 2006
    diff -uNr dmd-0.177/dmd/html/d/dll.html dmd-0.178/dmd/html/d/dll.html --- dmd-0.177/dmd/html/d/dll.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/dll.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Sat Dec 9 00:40:27 2006 +
    Last update Sun Dec 10 22:56:56 2006
    @@ -218,7 +218,6 @@ DLLs can be created in D in roughly the same way as in C. A DllMain() - is required, looking like:
    import std.c.windows.windows;
    @@ -262,8 +261,7 @@
     	Notes:
     	
    • The _moduleUnitTests() call is optional. -
    • The presence of DllMain() - is recognized by the compiler +
    • The presence of DllMain() is recognized by the compiler causing it to emit a reference to __acrtused_dll and the phobos.lib runtime library. @@ -546,8 +544,7 @@
      DllMain
      This is the main entry point for any D DLL. It gets called by the C startup code - (for DMC++, the source is \dm\src\win32\dllstart.c -). + (for DMC++, the source is \dm\src\win32\dllstart.c). The printf's are placed there so one can trace how it gets called. Notice that the initialization and termination code seen in @@ -616,22 +613,16 @@ - To build the mydll.dll - DLL: + To build the mydll.dll DLL:
        -
      1. dmd -c mydll -g - -
        Compiles mydll.d - into mydll.obj -. +
      2. dmd -c mydll -g +
        Compiles mydll.d into mydll.obj. -g turns on debug info generation.

        -

      3. dmd mydll.obj \dmd\lib\gcstub.obj mydll.def -g -L/map - -
        Links mydll.obj - into a DLL named +
      4. dmd mydll.obj \dmd\lib\gcstub.obj mydll.def -g -L/map +
        Links mydll.obj into a DLL named
      mydll.dll



      @@ -649,13 +640,11 @@ -mydll.dll). - gcstub.obj - is not required, but it prevents the bulk +. + gcstub.obj is not required, but it prevents the bulk of the gc code from being linked in, since it will not be used anyway. It saves about 12Kb. - mydll.def - is the + mydll.def is the Module Definition File, and has the contents: @@ -667,27 +656,21 @@
    -g turns on debug info generation, and - -L/map generates a map file mydll.map -. + -L/map generates a map file mydll.map.

    -

  • implib /noi /system mydll.lib mydll.dll - +
  • implib /noi /system mydll.lib mydll.dll
    Creates an import library - mydll.lib - suitable + mydll.lib suitable for linking in with an application that will be statically - loading mydll.dll -. + loading mydll.dll.

    - + ) - Here's test.d -, a sample application that makes use of - mydll.dll -. There are two versions, one statically binds to + Here's test.d, a sample application that makes use of + mydll.dll. There are two versions, one statically binds to the DLL, and the other dynamically loads it.

    import std.stdio;
    @@ -790,21 +773,14 @@
     
    C:>dmd test mydll.lib -g
     
    - Note how it is linked with mydll.lib -, the import library - for mydll.dll -. - The code is straightforward, it initializes mydll.lib - with + Note how it is linked with mydll.lib, the import library + for mydll.dll. + The code is straightforward, it initializes mydll.lib with a call to MyDLL_Initialize(), passing the handle - to test.exe -'s gc. + to test.exe's gc. Then, we can use the DLL and call its functions just as if - it were part of test.exe -. In foo(), gc memory - is allocated and freed both by test.exe - and mydll.dll -. + it were part of test.exe. In foo(), gc memory + is allocated and freed both by test.exe and mydll.dll. When we're done using the DLL, it is terminated with MyDLL_Terminate().

    @@ -828,20 +804,17 @@

    C:>dmd test -version=DYNAMIC_LOAD -g
     
    - The import library mydll.lib - is not needed. + The import library mydll.lib is not needed. The DLL is loaded with a call to LoadLibraryA(), and each exported function has to be retrieved via a call to GetProcAddress(). An easy way to get the decorated name to pass to GetProcAddress() - is to copy and paste it from the generated mydll.map - file + is to copy and paste it from the generated mydll.map file under the Export heading. Once this is done, we can use the member functions of the - DLL classes as if they were part of test.exe -. + DLL classes as if they were part of test.exe. When done, release the DLL with FreeLibrary().

    diff -uNr dmd-0.177/dmd/html/d/download.html dmd-0.178/dmd/html/d/download.html --- dmd-0.177/dmd/html/d/download.html 2006-12-05 18:54:34.000000000 +0100 +++ dmd-0.178/dmd/html/d/download.html 2006-12-10 22:57:00.000000000 +0100 @@ -32,7 +32,7 @@ -

    Last update Tue Dec 5 18:54:32 2006 +
    Last update Sun Dec 10 22:56:58 2006
    diff -uNr dmd-0.177/dmd/html/d/dstyle.html dmd-0.178/dmd/html/d/dstyle.html --- dmd-0.177/dmd/html/d/dstyle.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/dstyle.html 2006-12-14 17:35:48.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:30 2006 +
    Last update Thu Dec 14 17:35:46 2006
    @@ -195,9 +195,9 @@

    The D Style is a set of style conventions for writing D programs. The D Style is not enforced by the compiler, it is purely cosmetic and a matter of choice. Adhering to the D Style, - however, will make it easier for others to work with your D - code and easier for you to work with others' D code. - The D Style can form the starting point for a D project + however, will make it easier for others to work with your + code and easier for you to work with others' code. + The D Style can form the starting point for a project style guide customized for your project team.

    @@ -209,7 +209,8 @@
    • One statement per line.
    • -
    • Hardware tabs are at 8 column increments.
    • +
    • Hardware tabs are at 8 column increments. Avoid using + hardware tabs if they are set at a different value.
    • Each indentation level will be four columns.
    • @@ -227,6 +228,7 @@
      statement;	// comment
       statement;	// comment
       
      +
    • Use block comments to document a multiple line block of statements: @@ -237,6 +239,7 @@ statement; statement;
    +
  • Use nesting comments to 'comment out' a piece of trial code:
    /+++++
    @@ -248,13 +251,12 @@
          statement;
      +++++/
     
    - +
  • Naming Conventions

    -
    -
    General +
    General
    Names formed by joining multiple words should have each word other than the first capitalized. Names shall not begin with an underscore '_'. @@ -265,8 +267,7 @@
    Module
    Module and package names are all lower case, and only contain the characters [a..z][0..9][_]. This avoids problems dealing - with case insensitive file systems. -

    + with case insensitive file systems.

    C Modules
    Modules that are interfaces to C functions go into the "c" @@ -274,50 +275,52 @@
    import std.c.stdio;
     
    Module names should be all lower case. -

    +

    -
    Class, Struct, Union, Enum names +
    Class, Struct, Union, Enum, Template names
    are capitalized.
    class Foo;
     class FooAndBar;
     
    +
    -
    Function names +
    Function names
    Function names are not capitalized.
    int done();
     int doneProcessing();
     
    +
    -
    Const names -
    Are in all caps. +
    Const names
    +
    Are in all caps.
    -
    Enum member names -
    Are in all caps. +
    Enum member names
    +
    Are in all caps.
    -
    +

    Meaningless Type Aliases

    - Things like: +

    Things like:

    alias void VOID;
     alias int INT;
     alias int* pint;
     
    - should be avoided. +

    should be avoided.

    Declaration Style

    - Since in D the declarations are left-associative, left justify them: +

    Since the declarations are left-associative, left justify them:

    int[] x, y;	// makes it clear that x and y are the same type
     int** p, q;	// makes it clear that p and q are the same type
     
    - to emphasize their relationship. Do not use the C style: +

    to emphasize their relationship. Do not use the C style:

    int []x, y;	// confusing since y is also an int[]
     int **p, q;	// confusing since q is also an int**
    @@ -325,17 +328,22 @@
     
     

    Operator Overloading

    - Operator overloading is a powerful tool to extend the basic +

    Operator overloading is a powerful tool to extend the basic types supported by the language. But being powerful, it has great potential for creating obfuscated code. In particular, the existing D operators have conventional meanings, such as '+' means 'add' and '<<' means 'shift left'. Overloading operator '+' with a meaning different from 'add' is arbitrarily confusing and should be avoided. +

    Hungarian Notation

    - Just say no. +

    Using hungarian notation to denote the type of a variable + is a bad idea. + However, using notation to denote the purpose of a variable + (that cannot be expressed by its type) is often a good + practice.

    Documentation

    diff -uNr dmd-0.177/dmd/html/d/entity.html dmd-0.178/dmd/html/d/entity.html --- dmd-0.177/dmd/html/d/entity.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/entity.html 2006-12-10 23:20:34.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:30 2006 +
    Last update Sun Dec 10 23:20:33 2006
    @@ -130,281 +130,279 @@

    Named Character Entities

    - These are the character entity names supported by D. -

    +

    These are the character entity names supported by D. +

    - Note: Not all will display properly in the Symbol +

    Note: Not all will display properly in the Symbol column in all browsers. -

    +

    -
    - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Named Character Entities
    Name Value Symbol +
    Name Value Symbol
    quot 34 " -
    amp 38 & -
    lt 60 < -
    gt 62 > - -
    OElig 338 Π-
    oelig 339 œ -
    Scaron 352 Š -
    scaron 353 š -
    Yuml 376 Ÿ -
    circ 710 ˆ -
    tilde 732 ˜ -
    ensp 8194   -
    emsp 8195   -
    thinsp 8201   -
    zwnj 8204 ‌ -
    zwj 8205 ‍ -
    lrm 8206 ‎ -
    rlm 8207 ‏ -
    ndash 8211 – -
    mdash 8212 — -
    lsquo 8216 ‘ -
    rsquo 8217 ’ -
    sbquo 8218 ‚ -
    ldquo 8220 “ -
    rdquo 8221 ” -
    bdquo 8222 „ -
    dagger 8224 † -
    Dagger 8225 ‡ -
    permil 8240 ‰ -
    lsaquo 8249 ‹ -
    rsaquo 8250 › -
    euro 8364 € +
    quot 34 "
    amp 38 &
    lt 60 <
    gt 62 >
    OElig 338 Œ
    oelig 339 œ
    Scaron 352 Š
    scaron 353 š
    Yuml 376 Ÿ
    circ 710 ˆ
    tilde 732 ˜
    ensp 8194
    emsp 8195
    thinsp 8201
    zwnj 8204
    zwj 8205
    lrm 8206
    rlm 8207
    ndash 8211
    mdash 8212
    lsquo 8216
    rsquo 8217
    sbquo 8218
    ldquo 8220
    rdquo 8221
    bdquo 8222
    dagger 8224
    Dagger 8225
    permil 8240
    lsaquo 8249
    rsaquo 8250
    euro 8364
    Latin-1 (ISO-8859-1) Entities
    nbsp 160   -
    iexcl 161 ¡ -
    cent 162 ¢ -
    pound 163 £ -
    curren 164 ¤ -
    yen 165 ¥ -
    brvbar 166 ¦ -
    sect 167 § -
    uml 168 ¨ -
    copy 169 © -
    ordf 170 ª -
    laquo 171 « -
    not 172 ¬ -
    shy 173 ­ -
    reg 174 ® -
    macr 175 ¯ -
    deg 176 ° -
    plusmn 177 ± -
    sup2 178 ² -
    sup3 179 ³ -
    acute 180 ´ -
    micro 181 µ -
    para 182 ¶ -
    middot 183 · -
    cedil 184 ¸ -
    sup1 185 ¹ -
    ordm 186 º -
    raquo 187 » -
    frac14 188 ¼ -
    frac12 189 ½ -
    frac34 190 ¾ -
    iquest 191 ¿ -
    Agrave 192 À -
    Aacute 193 Á -
    Acirc 194 Â -
    Atilde 195 Ã -
    Auml 196 Ä -
    Aring 197 Å -
    AElig 198 Æ -
    Ccedil 199 Ç -
    Egrave 200 È -
    Eacute 201 É -
    Ecirc 202 Ê -
    Euml 203 Ë -
    Igrave 204 Ì -
    Iacute 205 Í -
    Icirc 206 Î -
    Iuml 207 Ï -
    ETH 208 Ð -
    Ntilde 209 Ñ -
    Ograve 210 Ò -
    Oacute 211 Ó -
    Ocirc 212 Ô -
    Otilde 213 Õ -
    Ouml 214 Ö -
    times 215 × -
    Oslash 216 Ø -
    Ugrave 217 Ù -
    Uacute 218 Ú -
    Ucirc 219 Û -
    Uuml 220 Ü -
    Yacute 221 Ý -
    THORN 222 Þ -
    szlig 223 ß -
    agrave 224 à -
    aacute 225 á -
    acirc 226 â -
    atilde 227 ã -
    auml 228 ä -
    aring 229 å -
    aelig 230 æ -
    ccedil 231 ç -
    egrave 232 è -
    eacute 233 é -
    ecirc 234 ê -
    euml 235 ë -
    igrave 236 ì -
    iacute 237 í -
    icirc 238 î -
    iuml 239 ï -
    eth 240 ð -
    ntilde 241 ñ -
    ograve 242 ò -
    oacute 243 ó -
    ocirc 244 ô -
    otilde 245 õ -
    ouml 246 ö -
    divide 247 ÷ -
    oslash 248 ø -
    ugrave 249 ù -
    uacute 250 ú -
    ucirc 251 û -
    uuml 252 ü -
    yacute 253 ý -
    thorn 254 þ -
    yuml 255 ÿ +
    nbsp 160  
    iexcl 161 ¡
    cent 162 ¢
    pound 163 £
    curren 164 ¤
    yen 165 ¥
    brvbar 166 ¦
    sect 167 §
    uml 168 ¨
    copy 169 ©
    ordf 170 ª
    laquo 171 «
    not 172 ¬
    shy 173 ­
    reg 174 ®
    macr 175 ¯
    deg 176 °
    plusmn 177 ±
    sup2 178 ²
    sup3 179 ³
    acute 180 ´
    micro 181 µ
    para 182
    middot 183 ·
    cedil 184 ¸
    sup1 185 ¹
    ordm 186 º
    raquo 187 »
    frac14 188 ¼
    frac12 189 ½
    frac34 190 ¾
    iquest 191 ¿
    Agrave 192 À
    Aacute 193 Á
    Acirc 194 Â
    Atilde 195 Ã
    Auml 196 Ä
    Aring 197 Å
    AElig 198 Æ
    Ccedil 199 Ç
    Egrave 200 È
    Eacute 201 É
    Ecirc 202 Ê
    Euml 203 Ë
    Igrave 204 Ì
    Iacute 205 Í
    Icirc 206 Î
    Iuml 207 Ï
    ETH 208 Ð
    Ntilde 209 Ñ
    Ograve 210 Ò
    Oacute 211 Ó
    Ocirc 212 Ô
    Otilde 213 Õ
    Ouml 214 Ö
    times 215 ×
    Oslash 216 Ø
    Ugrave 217 Ù
    Uacute 218 Ú
    Ucirc 219 Û
    Uuml 220 Ü
    Yacute 221 Ý
    THORN 222 Þ
    szlig 223 ß
    agrave 224 à
    aacute 225 á
    acirc 226 â
    atilde 227 ã
    auml 228 ä
    aring 229 å
    aelig 230 æ
    ccedil 231 ç
    egrave 232 è
    eacute 233 é
    ecirc 234 ê
    euml 235 ë
    igrave 236 ì
    iacute 237 í
    icirc 238 î
    iuml 239 ï
    eth 240 ð
    ntilde 241 ñ
    ograve 242 ò
    oacute 243 ó
    ocirc 244 ô
    otilde 245 õ
    ouml 246 ö
    divide 247 ÷
    oslash 248 ø
    ugrave 249 ù
    uacute 250 ú
    ucirc 251 û
    uuml 252 ü
    yacute 253 ý
    thorn 254 þ
    yuml 255 ÿ
    Symbols and Greek letter entities
    fnof 402 ƒ -
    Alpha 913 Α -
    Beta 914 Β -
    Gamma 915 Γ -
    Delta 916 Δ -
    Epsilon 917 Ε -
    Zeta 918 Ζ -
    Eta 919 Η -
    Theta 920 Θ -
    Iota 921 Ι -
    Kappa 922 Κ -
    Lambda 923 Λ -
    Mu 924 Μ -
    Nu 925 Ν -
    Xi 926 Ξ -
    Omicron 927 Ο -
    Pi 928 Π -
    Rho 929 Ρ -
    Sigma 931 Σ -
    Tau 932 Τ -
    Upsilon 933 Υ -
    Phi 934 Φ -
    Chi 935 Χ -
    Psi 936 Ψ -
    Omega 937 Ω -
    alpha 945 α -
    beta 946 β -
    gamma 947 γ -
    delta 948 δ -
    epsilon 949 ε -
    zeta 950 ζ -
    eta 951 η -
    theta 952 θ -
    iota 953 ι -
    kappa 954 κ -
    lambda 955 λ -
    mu 956 μ -
    nu 957 ν -
    xi 958 ξ -
    omicron 959 ο -
    pi 960 π -
    rho 961 ρ -
    sigmaf 962 ς -
    sigma 963 σ -
    tau 964 τ -
    upsilon 965 υ -
    phi 966 φ -
    chi 967 χ -
    psi 968 ψ -
    omega 969 ω -
    thetasym 977 ϑ -
    upsih 978 ϒ -
    piv 982 ϖ -
    bull 8226 • -
    hellip 8230 … -
    prime 8242 ′ -
    Prime 8243 ″ -
    oline 8254 ‾ -
    frasl 8260 ⁄ -
    weierp 8472 ℘ -
    image 8465 ℑ -
    real 8476 ℜ -
    trade 8482 ™ -
    alefsym 8501 ℵ -
    larr 8592 ← -
    uarr 8593 ↑ -
    rarr 8594 → -
    darr 8595 ↓ -
    harr 8596 ↔ -
    crarr 8629 ↵ -
    lArr 8656 ⇐ -
    uArr 8657 ⇑ -
    rArr 8658 ⇒ -
    dArr 8659 ⇓ -
    hArr 8660 ⇔ -
    forall 8704 ∀ -
    part 8706 ∂ -
    exist 8707 ∃ -
    empty 8709 ∅ -
    nabla 8711 ∇ -
    isin 8712 ∈ -
    notin 8713 ∉ -
    ni 8715 ∋ -
    prod 8719 ∏ -
    sum 8721 ∑ -
    minus 8722 − -
    lowast 8727 ∗ -
    radic 8730 √ -
    prop 8733 ∝ -
    infin 8734 ∞ -
    ang 8736 ∠ -
    and 8743 ∧ -
    or 8744 ∨ -
    cap 8745 ∩ -
    cup 8746 ∪ -
    int 8747 ∫ -
    there4 8756 ∴ -
    sim 8764 ∼ -
    cong 8773 ≅ -
    asymp 8776 ≈ -
    ne 8800 ≠ -
    equiv 8801 ≡ -
    le 8804 ≤ -
    ge 8805 ≥ -
    sub 8834 ⊂ -
    sup 8835 ⊃ -
    nsub 8836 ⊄ -
    sube 8838 ⊆ -
    supe 8839 ⊇ -
    oplus 8853 ⊕ -
    otimes 8855 ⊗ -
    perp 8869 ⊥ -
    sdot 8901 ⋅ -
    lceil 8968 ⌈ -
    rceil 8969 ⌉ -
    lfloor 8970 ⌊ -
    rfloor 8971 ⌋ -
    lang 9001 ⟨ -
    rang 9002 ⟩ -
    loz 9674 ◊ -
    spades 9824 ♠ -
    clubs 9827 ♣ -
    hearts 9829 ♥ -
    diams 9830 ♦ +
    fnof 402 ƒ
    Alpha 913 Α
    Beta 914 Β
    Gamma 915 Γ
    Delta 916 Δ
    Epsilon 917 Ε
    Zeta 918 Ζ
    Eta 919 Η
    Theta 920 Θ
    Iota 921 Ι
    Kappa 922 Κ
    Lambda 923 Λ
    Mu 924 Μ
    Nu 925 Ν
    Xi 926 Ξ
    Omicron 927 Ο
    Pi 928 Π
    Rho 929 Ρ
    Sigma 931 Σ
    Tau 932 Τ
    Upsilon 933 Υ
    Phi 934 Φ
    Chi 935 Χ
    Psi 936 Ψ
    Omega 937 Ω
    alpha 945 α
    beta 946 β
    gamma 947 γ
    delta 948 δ
    epsilon 949 ε
    zeta 950 ζ
    eta 951 η
    theta 952 θ
    iota 953 ι
    kappa 954 κ
    lambda 955 λ
    mu 956 μ
    nu 957 ν
    xi 958 ξ
    omicron 959 ο
    pi 960 π
    rho 961 ρ
    sigmaf 962 ς
    sigma 963 σ
    tau 964 τ
    upsilon 965 υ
    phi 966 φ
    chi 967 χ
    psi 968 ψ
    omega 969 ω
    thetasym 977 ϑ
    upsih 978 ϒ
    piv 982 ϖ
    bull 8226
    hellip 8230
    prime 8242
    Prime 8243
    oline 8254
    frasl 8260
    weierp 8472
    image 8465
    real 8476
    trade 8482
    alefsym 8501
    larr 8592
    uarr 8593
    rarr 8594
    darr 8595
    harr 8596
    crarr 8629
    lArr 8656
    uArr 8657
    rArr 8658
    dArr 8659
    hArr 8660
    forall 8704
    part 8706
    exist 8707
    empty 8709
    nabla 8711
    isin 8712
    notin 8713
    ni 8715
    prod 8719
    sum 8721
    minus 8722
    lowast 8727
    radic 8730
    prop 8733
    infin 8734
    ang 8736
    and 8743
    or 8744
    cap 8745
    cup 8746
    int 8747
    there4 8756
    sim 8764
    cong 8773
    asymp 8776
    ne 8800
    equiv 8801
    le 8804
    ge 8805
    sub 8834
    sup 8835
    nsub 8836
    sube 8838
    supe 8839
    oplus 8853
    otimes 8855
    perp 8869
    sdot 8901
    lceil 8968
    rceil 8969
    lfloor 8970
    rfloor 8971
    lang 9001
    rang 9002
    loz 9674
    spades 9824
    clubs 9827
    hearts 9829
    diams 9830
    -
    diff -uNr dmd-0.177/dmd/html/d/enum.html dmd-0.178/dmd/html/d/enum.html --- dmd-0.177/dmd/html/d/enum.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/enum.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@
    -
    Last update Tue Dec 5 18:54:29 2006 +
    Last update Sun Dec 10 22:56:55 2006
    diff -uNr dmd-0.177/dmd/html/d/errors.html dmd-0.178/dmd/html/d/errors.html --- dmd-0.177/dmd/html/d/errors.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/errors.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:30 2006 +
    Last update Sun Dec 10 22:56:56 2006
    diff -uNr dmd-0.177/dmd/html/d/exception-safe.html dmd-0.178/dmd/html/d/exception-safe.html --- dmd-0.177/dmd/html/d/exception-safe.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/exception-safe.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:57 2006
    @@ -432,11 +432,9 @@

    Example

    The next example involves temporarily changing the state of some object. -Suppose there's a class data member verbose -, which controls the +Suppose there's a class data member verbose, which controls the emission of messages logging the activity of the class. -Inside one of the methods, verbose - needs to be turned off because +Inside one of the methods, verbose needs to be turned off because there's a loop that would otherwise cause a blizzard of messages to be output:
    class Foo
    @@ -453,8 +451,7 @@
     }
     
    -There's a problem if Foo.bar() - exits via an exception - the verbose +There's a problem if Foo.bar() exits via an exception - the verbose flag state is not restored. That's easily fixed with scope(exit): @@ -473,8 +470,7 @@ }
    -

    It also neatly solves the problem if ...lots of code... - goes on at +

    It also neatly solves the problem if ...lots of code... goes on at some length, and in the future a maintenance programmer inserts a return statement in it, not realizing that verbose must be reset upon exit. The reset code is where it belongs conceptually, rather than where diff -uNr dmd-0.177/dmd/html/d/expression.html dmd-0.178/dmd/html/d/expression.html --- dmd-0.177/dmd/html/d/expression.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/expression.html 2006-12-14 21:31:36.000000000 +0100 @@ -31,7 +31,7 @@ -

    Last update Sat Dec 9 00:40:27 2006 +
    Last update Thu Dec 14 21:31:35 2006
    @@ -363,13 +363,9 @@ For class and struct objects, the expression (a == b) - is rewritten as - a.opEquals(b) -, and (a != b) - is rewritten as - !a.opEquals(b) -. + a.opEquals(b), and (a != b) is rewritten as + !a.opEquals(b).

    For static and dynamic arrays, equality is defined as the @@ -384,8 +380,7 @@ The is compares for identity. - To compare for not identity, use e1 !is e2 -. + To compare for not identity, use e1 !is e2. The type of the result is bool. The operands go through the usual conversions to bring them to a common type before comparison. @@ -851,10 +846,8 @@ } -

    In order to determine if an object o - is an instance of - a class B - use a cast: +

    In order to determine if an object o is an instance of + a class B use a cast:

    if (cast(B) o)
    @@ -1040,8 +1033,7 @@
     	Within a non-static member function, super resolves to
     	a reference to the object that called the function, cast to
     	its base class. It is an error if there is no base class.
    -	(Only class Object
    - has no base class.)
    +	(Only class Object has no base class.)
     	super is not allowed in struct member
     	functions.
     	If a member function is called with an explicit reference
    @@ -1089,6 +1081,8 @@
     	The type of the first element is taken to be the type of
     	all the elements, and all elements are implicitly converted
     	to that type.
    +	If that type is a static array, it is converted to a dynamic
    +	array.
     	

    [1,2,3];	// type is int[3], with elements 1, 2 and 3
    @@ -1223,15 +1217,13 @@
     	It is an error if the expression contains any side effects
     	that the program depends on. The compiler may optionally not
     	evaluate assert expressions at all.
    -	The result type of an assert expression is void
    -.
    +	The result type of an assert expression is void.
     	Asserts are a fundamental part of the
     	Contract Programming
     	support in D.
     	

    -

    The expression assert(0) - is a special case; it +

    The expression assert(0) is a special case; it signifies that it is unreachable code. Either AssertError is thrown at runtime if it is reachable, or the execution is halted @@ -1242,8 +1234,7 @@

    The second Expression, if present, must be implicitly - convertible to type char[] -. It is evaluated if the + convertible to type char[]. It is evaluated if the result is false, and the string result is appended to the AssertError's message.

    diff -uNr dmd-0.177/dmd/html/d/faq.html dmd-0.178/dmd/html/d/faq.html --- dmd-0.177/dmd/html/d/faq.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/faq.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Sat Dec 9 00:40:27 2006 +
    Last update Sun Dec 10 22:56:56 2006
    @@ -207,7 +207,7 @@
  • Where can I get an IDE for D?
  • What about templates?
  • Why emphasize implementation ease?
  • -
  • Why did you leave [expletive deleted] printf in?
  • +
  • Why is [expletive deleted] printf left in?
  • Will D be open source?
  • Why fall through on switch statements?
  • Why should I use D instead of Java?
  • @@ -612,15 +612,13 @@ tool.

    Why not support regular expression literals - with the /foo/g - syntax?

    + with the /foo/g syntax?

    There are two reasons:

      -
    1. The /foo/g - syntax would make it impossible to separate +
    2. The /foo/g syntax would make it impossible to separate the lexer from the parser, as / is the divide token.
    3. There are already 3 string types; adding the regex literals diff -uNr dmd-0.177/dmd/html/d/float.html dmd-0.178/dmd/html/d/float.html --- dmd-0.177/dmd/html/d/float.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/float.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
      Last update Tue Dec 5 18:54:30 2006 +
      Last update Sun Dec 10 22:56:56 2006
      diff -uNr dmd-0.177/dmd/html/d/function.html dmd-0.178/dmd/html/d/function.html --- dmd-0.177/dmd/html/d/function.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/function.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
      Last update Sat Dec 9 00:40:27 2006 +
      Last update Sun Dec 10 22:56:55 2006
      @@ -177,10 +177,8 @@ overridden.

      - Functions marked as final - may not be overridden in a - derived class, unless they are also private -. + Functions marked as final may not be overridden in a + derived class, unless they are also private. For example:

      class A
      @@ -352,9 +350,9 @@
       	(There is no register keyword either.)
       
       
      -

      Function Overloading

      +

      Function Overloading

      - In C++, there are many complex levels of function overloading, with +

      In C++, there are many complex levels of function overloading, with some defined as "better" matches than others. If the code designer takes advantage of the more subtle behaviors of overload function selection, the code can become @@ -363,13 +361,15 @@ selected over another, but different C++ compilers can implement this tricky feature differently, producing subtly disastrous results. -

      +

      - In D, function overloading is simple. It matches exactly, it matches with - implicit conversions, or it does not match. If there is more than one match, it is an error. -

      +

      In D, function overloading is simple. It matches exactly, it matches + with implicit conversions, or it does not match. If there is more than + one match, it is an error. +

      - Functions defined with non-D linkage cannot be overloaded. +

      Functions defined with non-D linkage cannot be overloaded. +

      Function Parameters

      @@ -461,8 +461,7 @@ 2
      -

      A lazy parameter of type void - can accept an argument +

      A lazy parameter of type void can accept an argument of any type.

      Variadic Functions

      @@ -471,10 +470,9 @@ variadic functions. A variadic function can take one of three forms: -
        -
      1. C-style variadic functions -
      2. Variadic functions with type info -
      3. Typesafe variadic functions +
        1. C-style variadic functions
        2. +
        3. Variadic functions with type info
        4. +
        5. Typesafe variadic functions
        @@ -482,8 +480,7 @@ A C-style variadic function is declared as taking a parameter of ... after the required function parameters. - It has non-D linkage, such as extern (C) -: + It has non-D linkage, such as extern (C):
        extern (C) int foo(int x, int y, ...);
         
        @@ -499,12 +496,10 @@
         
         	C-style variadic functions match the C calling convention for
         	variadic functions, and is most useful for calling C library
        -	functions like printf
        -.
        +	functions like printf.
         	The implementiations of these variadic functions have a special
         	local variable declared for them,
        -	_argptr, which is a void*
        - pointer to the first of the
        +	_argptr, which is a void* pointer to the first of the
         	variadic
         	arguments. To access the arguments, _argptr must be cast
         	to a pointer to the expected argument type:
        @@ -538,8 +533,7 @@
         
         	These variadic functions have a special local variable declared for
         	them,
        -	_argptr, which is a void*
        - pointer to the first of the
        +	_argptr, which is a void* pointer to the first of the
         	variadic
         	arguments. To access the arguments, _argptr must be cast
         	to a pointer to the expected argument type:
        @@ -554,26 +548,7 @@
         
        An additional hidden argument - with the name _arguments - -

        -

        - - - - - - - and type TypeInfo[] - + with the name _arguments and type TypeInfo[] is passed to the function. _arguments gives the number of arguments and the type of each, enabling the creation of typesafe variadic functions. @@ -808,8 +783,8 @@ of the delegate is converted to a delegate.

        -
        int delegate[] dg;
        -foo(1, 3+x, dg, cast(int delegate[])null);
        +
        int delegate() dg;
        +foo(1, 3+x, dg, cast(int delegate())null);
         

        is the same as:

        @@ -819,19 +794,20 @@

        Local Variables

        - It is an error to use a local variable without first assigning it a +

        It is an error to use a local variable without first assigning it a value. The implementation may not always be able to detect these cases. Other language compilers sometimes issue a warning for this, but since it is always a bug, it should be an error. -

        +

        - It is an error to declare a local variable that is never referred to. +

        It is an error to declare a local variable that is never referred to. Dead variables, like anachronistic dead code, are just a source of confusion for maintenance programmers. -

        +

        - It is an error to declare a local variable that hides another local +

        It is an error to declare a local variable that hides another local variable in the same function: +

        void func(int x)
         {   int x;		error, hides previous definition of x
        @@ -845,20 +821,22 @@
         }
         
        - While this might look unreasonable, in practice whenever +

        While this might look unreasonable, in practice whenever this is done it either is a bug or at least looks like a bug. -

        +

        - It is an error to return the address of or a reference to a +

        It is an error to return the address of or a reference to a local variable. -

        +

        - It is an error to have a local variable and a label with the same name. +

        It is an error to have a local variable and a label with the same + name. +

        Nested Functions

        - Functions may be nested within other functions: +

        Functions may be nested within other functions:

        int bar(int a)
         {
        @@ -877,7 +855,8 @@
         }
         
        - Nested functions can be accessed only if the name is in scope. +

        Nested functions can be accessed only if the name is in scope.

        +
        void foo()
         {
            void A()
        @@ -905,7 +884,7 @@
         }
         
        - and: +

        and:

        int bar(int a)
         {
        @@ -921,9 +900,10 @@
         }
         
        - Nested functions have access to the variables and other symbols +

        Nested functions have access to the variables and other symbols defined by the lexically enclosing function. This access includes both the ability to read and write them. +

        int bar(int a)
         {   int c = 3;
        @@ -945,7 +925,7 @@
         }
         
        - This access can span multiple nesting levels: +

        This access can span multiple nesting levels:

        int bar(int a)
         {   int c = 3;
        @@ -962,9 +942,10 @@
         }
         
        - Static nested functions cannot access any stack variables of +

        Static nested functions cannot access any stack variables of any lexically enclosing function, but can access static variables. This is analogous to how static member functions behave. +

        int bar(int a)
         {   int c;
        @@ -980,7 +961,7 @@
         }
         
        - Functions can be nested within member functions: +

        Functions can be nested within member functions:

        struct Foo
         {   int a;
        @@ -997,9 +978,10 @@
         }
         
        - Member functions of nested classes and structs do not have +

        Member functions of nested classes and structs do not have access to the stack variables of the enclosing function, but do have access to the other symbols: +

        void test()
         {   int j;
        @@ -1027,12 +1009,13 @@
         }
         
        - Nested functions always have the D function linkage type. -

        +

        Nested functions always have the D function linkage type. +

        - Unlike module level declarations, declarations within function +

        Unlike module level declarations, declarations within function scope are processed in order. This means that two nested functions cannot mutually call each other: +

        void test()
         {
        @@ -1041,7 +1024,7 @@
         }
         
        - The solution is to use a delegate: +

        The solution is to use a delegate:

        void test()
         {
        @@ -1052,12 +1035,12 @@
         }
         
        - Future directions: This restriction may be removed. +

        Future directions: This restriction may be removed.

        -

        Delegates, Function Pointers, and Dynamic Closures

        +

        Delegates, Function Pointers, and Dynamic Closures

        - A function pointer can point to a static nested function: +

        A function pointer can point to a static nested function:

        int function() fp;
         
        @@ -1075,7 +1058,7 @@
         }
         
        - A delegate can be set to a non-static nested function: +

        A delegate can be set to a non-static nested function:

        int delegate() dg;
         
        @@ -1088,9 +1071,10 @@
         }
         
        - The stack variables, however, are not valid once the function +

        The stack variables, however, are not valid once the function declaring them has exited, in the same manner that pointers to stack variables are not valid upon exit from a function: +

        int* bar()
         {   int b;
        @@ -1100,7 +1084,7 @@
         }
         
        - Delegates to non-static nested functions contain two pieces of +

        Delegates to non-static nested functions contain two pieces of data: the pointer to the stack frame of the lexically enclosing function (called the frame pointer) and the address of the function. This is analogous to struct/class non-static member @@ -1108,6 +1092,7 @@ the address of the member function. Both forms of delegates are interchangeable, and are actually the same type: +

        struct Foo
         {   int a = 7;
        @@ -1136,8 +1121,7 @@
         	

        The .ptr property of a delegate will return the - frame pointer value as a void* -. + frame pointer value as a void*.

        The .funcptr property of a delegate will return the @@ -1150,18 +1134,17 @@

        Anonymous Functions and Anonymous Delegates

        - See Function Literals. - +

        See Function Literals. +

        main() Function

        - For console programs, main() - serves as the entry point. +

        For console programs, main() serves as the entry point. It gets called after all the module initializers are run, and after any unittests are run. After it returns, all the module destructors are run. - main() - must be declared using one of the following forms: + main() must be declared using one of the following forms: +

        void main() { ... }
         void main(char[][] args) { ... }
        @@ -1169,7 +1152,25 @@
         int main(char[][] args) { ... }
         
        -) + + +

        +

        + + + + + + + diff -uNr dmd-0.177/dmd/html/d/future.html dmd-0.178/dmd/html/d/future.html --- dmd-0.177/dmd/html/d/future.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/future.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
        Last update Tue Dec 5 18:54:30 2006 +
        Last update Sun Dec 10 22:56:56 2006
        diff -uNr dmd-0.177/dmd/html/d/garbage.html dmd-0.178/dmd/html/d/garbage.html --- dmd-0.177/dmd/html/d/garbage.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/garbage.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
        Last update Sat Dec 9 00:40:27 2006 +
        Last update Sun Dec 10 22:56:56 2006
        @@ -332,8 +332,7 @@ A copying garbage collector may change this value.

        -

      4. Do not store magic values into pointers, other than null -. +
      5. Do not store magic values into pointers, other than null.

      6. Do not write pointer values out to disk and read them back in @@ -383,13 +382,11 @@ This may result in intermediate conditions where there is not a valid pointer, and if the gc pauses the thread in such a condition, it can corrupt memory. - Most implementations of memcpy() - will work since the + Most implementations of memcpy() will work since the internal implementation of it does the copy in aligned chunks greater than or equal to a pointer size, but since this kind of implementation is not guaranteed by the C standard, use - memcpy() - only with extreme caution. + memcpy() only with extreme caution. diff -uNr dmd-0.177/dmd/html/d/glossary.html dmd-0.178/dmd/html/d/glossary.html --- dmd-0.177/dmd/html/d/glossary.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/glossary.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
        Last update Tue Dec 5 18:54:30 2006 +
        Last update Sun Dec 10 22:56:56 2006
        @@ -193,52 +193,138 @@

        Glossary

        - -
        COW (Copy On Write) -
        COW is a memory allocation strategy where arrays are copied +
        COW (Copy On Write)
        +
        COW is a memory allocation strategy where arrays are copied if they are to be modified. -

        +

        -
        GC (Garbage Collection) -
        Garbage collection is the common name for the more highbrow +
        GC (Garbage Collection)
        +
        Garbage collection is the common name for the term automatic memory management. Memory can be allocated and used, and the GC will automatically free any chunks of memory no longer - referred to. In contrast, C and C++ use explicit memory management - where the programmer must carefully match up each allocation with + referred to. In contrast, explicit memory management + is where the programmer must carefully match up each allocation with one and only one free. -

        +

        -
        Illegal -
        A code construct is illegal if it does not conform to the +
        Illegal
        +
        A code construct is illegal if it does not conform to the D language specification. This may be true even if the compiler or runtime fails to detect the error. -

        +

        -
        Implementation Defined Behavior -
        This is variation in behavior of the D language in a manner +
        Implementation Defined Behavior
        +
        This is variation in behavior of the D language in a manner that is up to the implementor of the language. An example of implementation defined behavior would be the size in bytes of a pointer: on a 32 bit machine it would be 4 bytes, on a 64 bit machine it would be 8 bytes. Minimizing implementation defined behavior in the language will maximize the portability of code. -

        +

        + +
        NRVO (Named Return Value Optimization)
        +

        NRVO is a technique invented by Walter Bright around + 1991 (the term for it was coined later) to minimize copying of struct + data. + Functions normally return their function return values in + registers. For structs, however, they often are too big to + fit in registers. The usual solution to this is to pass to + the function a hidden pointer to a struct instance in the + caller's stack frame, and the return value is copied there. + For example: +

        +
        struct S { int a, b, c, d; }
        +
        +S foo()
        +{
        +    S result;
        +    result.a = 3;
        +    return result;
        +}
        +
        +void test()
        +{
        +    S s = foo();
        +}
        +
        + +

        is rewritten as:

        + +
        S* foo(S* hidden)
        +{
        +    S result;
        +    result.a = 3;
        +    *hidden = result;
        +    return hidden;
        +}
        +
        +void test()
        +{
        +    S tmp;
        +    S s = *foo(&tmp);
        +}
        +
        +

        This rewrite gives us an extra temporaty object tmp, + and copies the struct contents twice. + What NRVO does is recognize that the sole purpose of result + is to provide a return value, and so all references to result + can be replaced with *hidden. + foo is then rewritten as: +

        +
        S* foo(S* hidden)
        +{
        +    hidden.a = 3;
        +    return hidden;
        +}
        +
        +

        A further optimization is done on the call to foo to eliminate + the other copy, giving:

        +
        void test()
        +{
        +    S s;
        +    foo(&s);
        +}
        +
        +

        The result is written directly into the destination s, + instead of passing through two other instances.

        +
        + +
        POD (Plain Old Data)
        +
        Refers to a struct that contains no hidden members, + does not have virtual functions, does not inherit, + has no destructor, + and can be initialized and copied via simple bit copies. + D structs are POD. +
        -
        RAII (Resource Acquisition Is Initialization) -
        RAII refers to the technique of having the destructor +
        RAII (Resource Acquisition Is Initialization)
        +
        RAII refers to the technique of having the destructor of a class object called when the object goes out of scope. The destructor then releases any resources acquired by that object. RAII is commonly used for resources that are in short supply or that must have a predictable point when they are released. -

        + RAII objects in D are created using the scope storage class. +

        + +
        SFINAE (Substitution Failure Is Not An Error)
        +
        If template argument deduction results in a type + that is not valid, that specialization of the template + is not considered further. It is not a compile error. + See also SFINAE. +
        + +
        TMP (Template Metaprogramming)
        +
        TMP is using the template features of the language to + execute programs at compile time rather than runtime.
        -
        Undefined Behavior -
        Undefined behavior happens when an illegal code construct is +
        UB (Undefined Behavior)
        +
        Undefined behavior happens when an illegal code construct is executed. Undefined behavior can include random, erratic results, crashes, faulting, etc. -

        +

        diff -uNr dmd-0.177/dmd/html/d/html.html dmd-0.178/dmd/html/d/html.html --- dmd-0.177/dmd/html/d/html.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/html.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
        Last update Tue Dec 5 18:54:30 2006 +
        Last update Sun Dec 10 22:56:56 2006
        diff -uNr dmd-0.177/dmd/html/d/htod.html dmd-0.178/dmd/html/d/htod.html --- dmd-0.177/dmd/html/d/htod.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/htod.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
        Last update Sat Dec 9 00:40:28 2006 +
        Last update Sun Dec 10 22:56:57 2006
        @@ -238,8 +238,7 @@
        -hc
        By default, htod will insert the C and C++ declarations -in a file into the output file prefixed by //C -. +in a file into the output file prefixed by //C . -hc will suppress this. Use only if you're confident that htod is generating the correct output file (such as if the header file was modified with @@ -248,15 +247,13 @@
        -hi -
        By default, htod will represent a #include "file" - with +
        By default, htod will represent a #include "file" with a corresponding import statement. The -hi will cause the declarations in the included file to be converted to D declarations as well. The declarations in all included files are parsed regardless. -hi is handy when replacing an entire hierarchy of include files with a single D import. -System includes like #include <file> - are not affected +System includes like #include <file> are not affected by -hi. See also -hs.
        @@ -311,8 +308,7 @@ void bar(int x, int y, long z);
      7. -

        The C declarations are prefixed by the string "//C " -.

        +

        The C declarations are prefixed by the string "//C ".

        Type Mappings

        diff -uNr dmd-0.177/dmd/html/d/htomodule.html dmd-0.178/dmd/html/d/htomodule.html --- dmd-0.177/dmd/html/d/htomodule.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/htomodule.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
        Last update Sat Dec 9 00:40:27 2006 +
        Last update Sun Dec 10 22:56:56 2006
        @@ -189,28 +189,22 @@
        -

        Converting C .h - Files to D Modules

        +

        Converting C .h Files to D Modules

        While D cannot directly compile C source code, it can easily interface to C code, be linked with C object files, and call C functions in DLLs. - The interface to C code is normally found in C .h - files. + The interface to C code is normally found in C .h files. So, the trick to connecting with C code is in converting C - .h - files to D modules. + .h files to D modules. This turns out to be difficult to do mechanically since inevitably some human judgement must be applied. This is a guide to doing such conversions.

        Preprocessor

        - .h - files can sometimes be a bewildering morass of layers of - macros, #include - files, #ifdef -'s, etc. D doesn't + .h files can sometimes be a bewildering morass of layers of + macros, #include files, #ifdef's, etc. D doesn't include a text preprocessor like the C preprocessor, so the first step is to remove the need for it by taking the preprocessed output. For DMC (the Digital @@ -219,15 +213,11 @@
        dmc -c program.h -e -l
         
        - will create a file program.lst - which is the source file after + will create a file program.lst which is the source file after all text preprocessing.

        - Remove all the #if -, #ifdef -, #include -, + Remove all the #if, #ifdef, #include, etc. statements.

        Linkage

        @@ -296,18 +286,13 @@

        NULL

        - NULL - and ((void*)0) - should be replaced - with null -. + NULL and ((void*)0) should be replaced + with null.

        Numeric Literals

        Any 'L' or 'l' numeric literal suffixes should be removed, - as a C long - is (usually) the same size as a D int -. + as a C long is (usually) the same size as a D int. Similarly, 'LL' suffixes should be replaced with a single 'L'. Any 'u' suffix will work the same in D. @@ -434,10 +419,8 @@

        Const Type Modifiers

        - D has const - as a storage class, not a type modifier. Hence, just - drop any const - used as a type modifier: + D has const as a storage class, not a type modifier. Hence, just + drop any const used as a type modifier:
        void foo(const int *p, char *const q);
         
        @@ -454,38 +437,31 @@ there will be a multiple definition error. To fix this problem, the idea is to declare the variable in a D module, but not link in that module. For example, given a C header file named - foo.h -: + foo.h:
        struct Foo { };
         struct Foo bar;
         
        - It can be replaced with two D modules, foo.d -: + It can be replaced with two D modules, foo.d:
        struct Foo { }
         import fooextern;
         
        - and fooextern.d -: + and fooextern.d:
        Foo bar;
         
        - The foo.obj - file is linked in, and fooextern.obj - + The foo.obj file is linked in, and fooextern.obj is not. While this is not the most elegant looking method, it does work, and since it is pretty rare in C libraries to use global variables in its interface, it isn't an issue in practice.

        Typedef

        - alias - is the D equivalent to the C typedef -: + alias is the D equivalent to the C typedef:
        typedef int foo;
         
        @@ -518,11 +494,8 @@ A good D implementation by default will align struct members the same way as the C compiler it was designed to work with. But - if the .h - file has some #pragma -'s to control alignment, they - can be duplicated with the D align - attribute: + if the .h file has some #pragma's to control alignment, they + can be duplicated with the D align attribute:
        #pragma pack(1)
         struct Foo
        @@ -586,10 +559,7 @@
         }
         
        -

        __cdecl -, __pascal -, __stdcall -

        +

        __cdecl, __pascal, __stdcall

        int __cdecl x;
         int __cdecl foo(int a);
        @@ -605,8 +575,7 @@
         extern (Windows) int abc(int c);
         
        -

        __declspec(dllimport) -

        +

        __declspec(dllimport)

        __declspec(dllimport) int __stdcall foo(int a);
         
        @@ -616,11 +585,9 @@
        export extern (Windows) int foo(int a);
         
        -

        __fastcall -

        +

        __fastcall

        - Unfortunately, D doesn't support the __fastcall - convention. + Unfortunately, D doesn't support the __fastcall convention. Therefore, a shim will be needed, either written in C:
        int __fastcall foo(int a);
        @@ -631,12 +598,10 @@
         }
         
        - and compiled with a C compiler that supports __fastcall - and + and compiled with a C compiler that supports __fastcall and linked in, or compile the above, disassemble it with obj2asm - and insert it in a D myfoo - shim with + and insert it in a D myfoo shim with inline assembler. diff -uNr dmd-0.177/dmd/html/d/iasm.html dmd-0.178/dmd/html/d/iasm.html --- dmd-0.177/dmd/html/d/iasm.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/iasm.html 2006-12-14 17:41:50.000000000 +0100 @@ -32,7 +32,7 @@
        -
        Last update Tue Dec 5 18:54:30 2006 +
        Last update Thu Dec 14 17:41:48 2006
        @@ -134,19 +134,22 @@ Some Assembly Required - D, being a systems programming language, provides an inline assembler. +

        D, being a systems programming language, provides an inline + assembler. The inline assembler is standardized for D implementations across the same CPU family, for example, the Intel Pentium inline assembler for a Win32 D compiler will be syntax compatible with the inline assembler for Linux running on an Intel Pentium. -

        +

        - Differing D implementations, however, are free to innovate upon +

        Differing D implementations, however, are free to innovate upon the memory model, function call/return conventions, argument passing conventions, etc. -

        +

        - This document describes the x86 implementation of the inline assembler. +

        This document describes the x86 implementation of the inline + assembler. +

        AsmInstruction:
         	Identifier : AsmInstruction
        @@ -170,9 +173,10 @@
         
         

        Labels

        - Assembler instructions can be labeled just like other statements. +

        Assembler instructions can be labeled just like other statements. They can be the target of goto statements. For example: +

        void *pc;
         asm
        @@ -186,26 +190,29 @@
         
         

        align IntegerExpression

        - Causes the assembler to emit NOP instructions to align the next +

        Causes the assembler to emit NOP instructions to align the next assembler instruction on an IntegerExpression boundary. IntegerExpression must evaluate to an integer that is a power of 2. -

        +

        - Aligning the start of a loop body can sometimes have a dramatic +

        Aligning the start of a loop body can sometimes have a dramatic effect on the execution speed. +

        even

        - Causes the assembler to emit NOP instructions to align the next +

        Causes the assembler to emit NOP instructions to align the next assembler instruction on an even boundary. +

        naked

        - Causes the compiler to not generate the function prolog and epilog +

        Causes the compiler to not generate the function prolog and epilog sequences. This means such is the responsibility of inline assembly programmer, and is normally used when the entire function is to be written in assembler. +

        db, ds, di, dl, df, dd, de

        @@ -270,10 +277,9 @@

        Special Cases

        -
        - +
        lock, rep, repe, repne, - repnz, repz + repnz, repz
        These prefix instructions do not appear in the same statement as the instructions they prefix; they appear in their own statement. For example: @@ -284,8 +290,9 @@ movsb ; }
        +
    -
    pause +
    pause
    This opcode is not supported by the assembler, instead use
    {
    @@ -295,8 +302,9 @@
     
    which produces the same result. +
    -
    floating point ops +
    floating point ops
    Use the two operand form of the instruction format;
    fdiv ST(1);	// wrong
    @@ -304,8 +312,8 @@
     fdiv ST,ST(1);	// right
     fmul ST,ST(0);	// right
     
    - - +
    +

    Operands

    diff -uNr dmd-0.177/dmd/html/d/index.html dmd-0.178/dmd/html/d/index.html --- dmd-0.177/dmd/html/d/index.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/index.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:28 2006 +
    Last update Sun Dec 10 22:56:54 2006
    diff -uNr dmd-0.177/dmd/html/d/interface.html dmd-0.178/dmd/html/d/interface.html --- dmd-0.177/dmd/html/d/interface.html 2006-12-09 00:41:36.000000000 +0100 +++ dmd-0.178/dmd/html/d/interface.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Sat Dec 9 00:41:34 2006 +
    Last update Sun Dec 10 22:56:56 2006
    @@ -283,17 +283,14 @@

    A COM interface is defined as one that derives from the interface - std.c.windows.com.IUnknown -. A COM interface differs from + std.c.windows.com.IUnknown. A COM interface differs from a regular D interface in that: -

    -
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:57 2006
    @@ -173,8 +173,7 @@
  • There are no __cdecl, __far, __stdcall, __declspec, or other such C type modifiers in D. These are handled by attributes, such - as extern (C) -. + as extern (C).
  • There are no const or volatile type modifiers in D. To declare a C function that uses those type modifiers, just drop those @@ -435,8 +434,7 @@ Although printf is designed to handle 0 terminated strings, not D dynamic arrays of chars, it turns out that since D dynamic arrays are a length followed by a pointer to the data, - the %.*s - format works perfectly: + the %.*s format works perfectly:
    void foo(char[] string)
     {
    @@ -451,8 +449,7 @@
     	

    An improved D function for formatted output is - std.stdio.writef() -. + std.stdio.writef().

    Structs and Unions

    diff -uNr dmd-0.177/dmd/html/d/intro.html dmd-0.178/dmd/html/d/intro.html --- dmd-0.177/dmd/html/d/intro.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/intro.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Tue Dec 5 18:54:28 2006 +
    Last update Sun Dec 10 22:56:54 2006
    diff -uNr dmd-0.177/dmd/html/d/lazy-evaluation.html dmd-0.178/dmd/html/d/lazy-evaluation.html --- dmd-0.177/dmd/html/d/lazy-evaluation.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/lazy-evaluation.html 2006-12-10 22:57:00.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:58 2006
    @@ -210,13 +210,10 @@ }
    -

    The second expression p[0] - is not evaluated unless p - +

    The second expression p[0] is not evaluated unless p is not null. If the second expression was not lazily evaluated, it would -generate a runtime fault if p - was null. +generate a runtime fault if p was null.

    While invaluable, the lazy evaluation operators have significant @@ -267,8 +264,7 @@

    but that just papers over the problem. Preprocessor macros have well known shortcomings:

    - -
    Last update Tue Dec 5 18:54:32 2006 +
    Last update Sun Dec 10 22:56:58 2006
    @@ -130,21 +130,13 @@

    What made implementing this task so easy in D? I just happened to have every construct I needed at hand. Some of the goodies used, are:

    During the actual programming I did not have to stop and think about anything. The program evolved automatically, once I thought of the actual container for diff -uNr dmd-0.177/dmd/html/d/memory.html dmd-0.178/dmd/html/d/memory.html --- dmd-0.177/dmd/html/d/memory.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/memory.html 2006-12-10 23:09:40.000000000 +0100 @@ -32,7 +32,7 @@ -

    Last update Sat Dec 9 00:40:27 2006 +
    Last update Sun Dec 10 23:09:39 2006
    @@ -200,32 +200,30 @@ The three primary methods for allocating memory in D are: -
      -
    1. Static data, allocated in the default data segment. -
    2. Stack data, allocated on the CPU program stack. -
    3. Garbage collected data, +
      1. Static data, allocated in the default data segment.
      2. +
      3. Stack data, allocated on the CPU program stack.
      4. +
      5. Garbage collected data, allocated dynamically on the - garbage collection heap. + garbage collection heap.
      The techniques for using them, as well as some advanced alternatives are: -
        -
      • Strings (and Array) Copy-on-Write -
      • Real Time -
      • Smooth Operation -
      • Free Lists -
      • Reference Counting -
      • Explicit Class Instance Allocation -
      • Mark/Release -
      • RAII (Resource Acquisition Is Initialization) -
      • Allocating Class Instances On The Stack -
      • Allocating Uninitialized Arrays On The Stack + -

        Strings (and Array) Copy-on-Write

        +

        Strings (and Array) Copy-on-Write

        Consider the case of passing an array to a function, possibly modifying the contents of the array, and returning the modified @@ -315,20 +313,20 @@ There are several techniques to eliminate or mitigate the effect: -
      • Preallocate all data needed before the part of the code - that needs to be smooth is run. +
        • Preallocate all data needed before the part of the code + that needs to be smooth is run.
        • -
        • Manually run a GC collection cycle at points in program +
        • Manually run a GC collection cycle at points in program execution where it is already paused. An example of such a place would be where the program has just displayed a prompt for user input and the user has not responded yet. This reduces the odds that a collection cycle will be needed - during the smooth code. + during the smooth code.
        • -
        • Call std.gc.disable() before the smooth code is run, and +
        • Call std.gc.disable() before the smooth code is run, and std.gc.enable() afterwards. This will cause the GC to favor allocating - more memory instead of running a collection pass. - + more memory instead of running a collection pass.
        • +

        Free Lists

        @@ -374,17 +372,17 @@ Such free list approaches can be very high performance.
          -
        • If used by multiple threads, the allocate() and - deallocate() functions need to be synchronized. +
        • If used by multiple threads, the allocate() and + deallocate() functions need to be synchronized.
        • -
        • The Foo constructor is not re-run by allocate() when +
        • The Foo constructor is not re-run by allocate() when allocating from the free list, so the allocator may need - to reinitialize some of the members. + to reinitialize some of the members.
        • -
        • It is not necessary to practice RAII with this, since +
        • It is not necessary to practice RAII with this, since if any objects are not passed to deallocate() when done, because of a thrown exception, they'll eventually get picked up by - the GC anyway. + the GC anyway.

        Reference Counting

        @@ -411,9 +409,7 @@ to run. For specialized purposes, this can be handled by creating NewDeclarations and DeleteDeclarations. For example, to allocate using the C runtime library's - malloc - and free -: + malloc and free:
        import std.c.stdlib;
         import std.outofmemory;
        @@ -445,52 +441,52 @@
         	The critical features of new() are:
         
         	
          -
        • new() does not have a return type specified, +
        • new() does not have a return type specified, but it is defined to be void*. new() must return - a void*. + a void*.
        • -
        • If new() cannot allocate memory, it must - not return null, but must throw an exception. +
        • If new() cannot allocate memory, it must + not return null, but must throw an exception.
        • -
        • The pointer returned from new() must be to memory +
        • The pointer returned from new() must be to memory aligned to the default alignment. This is 8 on win32 - systems. + systems.
        • -
        • The size parameter is needed in case the +
        • The size parameter is needed in case the allocator is called from a class derived from Foo and is - a larger size than Foo. + a larger size than Foo.
        • -
        • A null is not returned if storage cannot be allocated. +
        • A null is not returned if storage cannot be allocated. Instead, an exception is thrown. Which exception gets thrown - is up to the programmer, in this case, OutOfMemory() is. + is up to the programmer, in this case, OutOfMemory() is.
        • -
        • When scanning memory for root pointers into the garbage +
        • When scanning memory for root pointers into the garbage collected heap, the static data segment and the stack are scanned automatically. The C heap is not. Therefore, if Foo or any class derived from Foo using the allocator contains any references to data allocated by the garbage collector, the GC needs to be notified. This is done with the std.gc.addRange() - method. + method.
        • -
        • No initialization of the memory is necessary, as code +
        • No initialization of the memory is necessary, as code is automatically inserted after the call to new() to set the class instance members to their defaults and then the constructor - (if any) is run. + (if any) is run.
        The critical features of delete() are:
          -
        • The destructor (if any) has already been called on the +
        • The destructor (if any) has already been called on the argument p, so the data it points to should be assumed to - be garbage. + be garbage.
        • -
        • The pointer p may be null. +
        • The pointer p may be null.
        • -
        • If the GC was notified with std.gc.addRange(), a corresponding - call to std.gc.removeRange() must happen in the deallocator. +
        • If the GC was notified with std.gc.addRange(), a corresponding + call to std.gc.removeRange() must happen in the deallocator.
        • -
        • If there is a delete(), there should be a corresponding new(). +
        • If there is a delete(), there should be a corresponding new().

        If memory is allocated using class specific allocators and deallocators, @@ -575,9 +571,9 @@ }

        -
      • The allocation of buffer[] itself is added as +

        The allocation of buffer[] itself is added as a region to the GC, so there is no need for a separate - call inside Foo.new() to do it. + call inside Foo.new() to do it.

        RAII (Resource Acquisition Is Initialization)

        @@ -642,27 +638,27 @@
          -
        • The uninitialized data that is on the stack will get scanned by the +
        • The uninitialized data that is on the stack will get scanned by the garbage collector looking for any references to allocated memory. Since the uninitialized data consists of old D stack frames, it is highly likely that some of that garbage will look like references into the GC heap, and the GC memory will not get freed. This problem really does - happen, and can be pretty frustrating to track down. + happen, and can be pretty frustrating to track down.
        • -
        • It's possible for a function to pass out of it a reference to data +
        • It's possible for a function to pass out of it a reference to data on that function's stack frame. By then allocating a new stack frame over the old data, and not initializing, the reference to the old data may still appear to be valid. The program will then behave erratically. Initializing all data on the stack frame will greatly increase the - probability of forcing that bug into the open in a repeatable manner. + probability of forcing that bug into the open in a repeatable manner.
        • -
        • Uninitialized data can be a source of bugs and trouble, even when +
        • Uninitialized data can be a source of bugs and trouble, even when used correctly. One design goal of D is to improve reliability and portability by eliminating sources of undefined behavior, and uninitialized data is one huge source of undefined, unportable, erratic and unpredictable behavior. Hence this idiom should only be used after other opportunities for speed optimization are exhausted and if - benchmarking shows that it really does speed up the overall execution. + benchmarking shows that it really does speed up the overall execution.
        @@ -678,8 +674,7 @@

        Therefore, the ISR thread should not be paused. Threads created with the std.thread functions will be paused. But threads created with C's - _beginthread() - or equivalent won't be, the GC + _beginthread() or equivalent won't be, the GC won't know they exist.

        @@ -687,8 +682,7 @@
        • The ISR thread cannot allocate any memory using the GC. - This means that the global new - cannot be used. + This means that the global new cannot be used. Nor can dynamic arrays be resized, nor can any elements be added to associative arrays. Any use of the D runtime library should be examined for any possibility of allocating GC memory - diff -uNr dmd-0.177/dmd/html/d/mixin.html dmd-0.178/dmd/html/d/mixin.html --- dmd-0.177/dmd/html/d/mixin.html 2006-12-05 18:54:32.000000000 +0100 +++ dmd-0.178/dmd/html/d/mixin.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@
        -
        Last update Tue Dec 5 18:54:30 2006 +
        Last update Sun Dec 10 22:56:55 2006
        diff -uNr dmd-0.177/dmd/html/d/module.html dmd-0.178/dmd/html/d/module.html --- dmd-0.177/dmd/html/d/module.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/module.html 2006-12-15 00:15:06.000000000 +0100 @@ -32,7 +32,7 @@
      -
      Last update Tue Dec 5 18:54:28 2006 +
      Last update Fri Dec 15 00:15:04 2006
      @@ -412,6 +412,25 @@

      static cannot be used with selective imports.

      +

      Renamed and Selective Imports

      + +

      When renaming and selective importing are combined:

      + +
      import io = std.stdio : foo = writefln;
      +
      +void main()
      +{
      +    writefln("bar");           // error, writefln is undefined
      +    std.stdio.foo("bar");      // error, foo is bound into current namespace
      +    std.stdio.writefln("bar"); // error, std is undefined
      +    foo("bar");                // ok, foo is bound into current namespace,
      +                               // FQN not required
      +    io.writefln("bar");        // ok, io=std.stdio bound the name io in
      +                               // the current namespace to refer to the entire module
      +    io.foo("bar");             // error, foo is bound into current namespace,
      +                               // foo is not a member of io
      +
      +

      Module Scope Operator

      Sometimes, it's necessary to override the usual lexical scoping rules diff -uNr dmd-0.177/dmd/html/d/operatoroverloading.html dmd-0.178/dmd/html/d/operatoroverloading.html --- dmd-0.177/dmd/html/d/operatoroverloading.html 2006-12-08 00:41:20.000000000 +0100 +++ dmd-0.178/dmd/html/d/operatoroverloading.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
      Last update Fri Dec 8 00:41:19 2006 +
      Last update Sun Dec 10 22:56:55 2006
      @@ -610,9 +610,9 @@

      Future Directions

      - The operators =, !, ., &&, ||, ?:, and a few others will likely never +

      The operators !, ., &&, ||, ?:, and a few others will likely never be overloadable. - +



      diff -uNr dmd-0.177/dmd/html/d/overview.html dmd-0.178/dmd/html/d/overview.html --- dmd-0.177/dmd/html/d/overview.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/overview.html 2006-12-10 22:56:56.000000000 +0100 @@ -23,7 +23,8 @@ www.digitalmars.com
      -
      -
      Last update Sat Dec 9 00:40:27 2006 +
      Last update Sun Dec 10 22:56:54 2006
      @@ -507,9 +508,20 @@ are available.
    4. -
    5. Distinction between . and ->. This distinction - is really not necessary. The . operator serves just as well for - pointer dereferencing. +
    6. Dumbed down floating point. If one is using hardware that + implements modern floating point, it should be available to the + programmer rather than having floating point support dumbed down + to the lowest common denominator among machines. In particular, + a D implementation must support IEEE 754 arithmetic and if + extended precision is available it must be supported.
    7. + +
    8. Template overloading of < and > symbols. + This choice has caused years of bugs, grief, and confusion + for programmers, C++ implementors, and C++ source parsing tool + vendors. It makes it + impossible to parse C++ code correctly without doing a nearly complete + C++ compiler. D uses !( and ) which fit neatly and + unambiguously into the grammar.
    9. @@ -550,14 +562,21 @@
    10. Numerical programmers. D has many features to directly - support features needed by numerics programmers, like direct support - for the complex data type and - defined behavior for + support features needed by numerics programmers, like + extended floating point precision, + core support for complex and imaginary floating types + and defined behavior for NaN's and infinities. (These are added in the new C99 standard, but not in C++.)
    11. +
    12. Programmers who write half their application in scripting + langauges like Ruby and Python, and the other half in C++ to + speed up the bottlenecks. D has many of the productivity features + of Ruby and Python, making it possible to write the entire app + in one language.
    13. +
    14. D's lexical analyzer and parser are totally independent of each other and of the semantic analyzer. This means it is easy to write simple tools to manipulate D source perfectly without having to build a full compiler. It also means that source code can be @@ -569,15 +588,12 @@

      Who D is Not For

      • Realistically, nobody is going to convert million line C or C++ - programs into D, and since D does not compile unmodified C/C++ + programs into D. + Since D does not compile unmodified C/C++ source code, D is not for - legacy apps. (However, D supports legacy C API's very well.) -
      • - -
      • Very small programs - a scripting or interpreted language like - Python, - DMDScript, - or Perl is likely more suitable. + legacy apps. + (However, D supports legacy C API's very well. D can connect + directly to any code that exposes a C interface.)
      • As a first programming language - Basic or Java is more suitable @@ -641,9 +657,7 @@ Instead of #include'ing the text of a file of declarations, just import the module. There is no need to worry about multiple imports of the same module, no need to wrapper header - files with #ifndef/#endif - or #pragma once - kludges, + files with #ifndef/#endif or #pragma once kludges, etc.

        @@ -680,7 +694,6 @@

        Note: Of course, in C++, trivial functions like { return 7; } - are written inline too, but complex ones are not. In addition, if there are any forward references, the functions need to be prototyped. The following will not work in C++: @@ -722,6 +735,8 @@

        D templates offer a clean way to support generic programming while offering the power of partial specialization. + Template classes and template functions are available, along + with variadic template arguments and tuples.

        @@ -859,11 +874,9 @@ The classic example of this are the argc and argv parameters to main(int argc , char *argv -[]) -. +[]). (In D, main is declared as main(char[][] args -) -.) +).)
      • Arrays are not first class objects. When an array is passed to a function, it is @@ -1298,7 +1311,8 @@ Copyright © 1999-2006 by Digital Mars, All Rights Reserved | Page generated by Ddoc. | -Comments +Comments diff -uNr dmd-0.177/dmd/html/d/phobos/object.html dmd-0.178/dmd/html/d/phobos/object.html --- dmd-0.177/dmd/html/d/phobos/object.html 2006-12-09 01:16:36.000000000 +0100 +++ dmd-0.178/dmd/html/d/phobos/object.html 2006-12-23 20:43:32.000000000 +0100 @@ -28,7 +28,7 @@
      -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -58,7 +58,7 @@ -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -61,7 +61,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:33 2006 +
      Last update Sat Dec 23 20:43:30 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:30 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:33 2006 +
      Last update Sat Dec 23 20:43:30 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:36 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:34 2006 +
      Last update Sat Dec 23 20:43:31 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:33 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:37 2006 +
      Last update Sat Dec 23 20:43:34 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 01:16:35 2006 +
      Last update Sat Dec 23 20:43:32 2006
      @@ -57,7 +57,7 @@ -
      Last update Sat Dec 9 00:40:27 2006 +
      Last update Thu Dec 14 17:24:30 2006
      @@ -130,91 +130,117 @@

      Portability Guide

      - It's good software engineering practice to minimize gratuitous +

      It's good software engineering practice to minimize gratuitous portability problems in the code. Techniques to minimize potential portability problems are: +

        -
      • The integral and floating type sizes should be considered as +
      • The integral and floating type sizes should be considered as minimums. Algorithms should be designed to continue to work properly if the - type size increases. + type size increases.
      • -
      • Floating point computations can be carried out at a higher +
      • Floating point computations can be carried out at a higher precision than the size of the floating point variable can hold. Floating point algorithms should continue to work properly if - precision is arbitrarily increased. + precision is arbitrarily increased.
      • -
      • Avoid depending on the order of side effects in a computation +
      • Avoid depending on the order of side effects in a computation that may get reordered by the compiler. For example:
        a + b + c
         
        - can be evaluated as (a + b) + c, a + (b + c), (a + c) + b, (c + b) + a, - etc. Parenthesis control operator precedence, parenthesis do not +

        can be evaluated as (a + b) + c, a + (b + c), (a + c) + b, (c + b) + a, + etc. Parentheses control operator precedence, parentheses do not control order of evaluation. -

        +

        - In particular, function parameters can be evaluated either left to right +

        Function parameters can be evaluated either left to right or right to left, depending on the particular calling conventions used. -

        +

        - If the operands of an associative operator + or * are floating +

        If the operands of an associative operator + or * are floating point values, the expression is not reordered. +

        +
      • -
      • Avoid dependence on byte order; i.e. whether the CPU - is big-endian or little-endian. +
      • Avoid dependence on byte order; i.e. whether the CPU + is big-endian or little-endian.
      • -
      • Avoid dependence on the size of a pointer or reference being - the same size as a particular integral type. +
      • Avoid dependence on the size of a pointer or reference being + the same size as a particular integral type.
      • -
      • If size dependencies are inevitable, put an assert - in +
      • If size dependencies are inevitable, put an assert in the code to verify it:
        assert(int.sizeof == (int*).sizeof);
         
        - +

      32 to 64 Bit Portability

      - 64 bit processors and operating systems are coming. +

      64 bit processors and operating systems are here. With that in mind: +

        -
      • Integral types will remain the same sizes between - 32 and 64 bit code. +
      • Integral types will remain the same sizes between + 32 and 64 bit code.
      • -
      • Pointers and object references will increase in size - from 4 bytes to 8 bytes going from 32 to 64 bit code. +
      • Pointers and object references will increase in size + from 4 bytes to 8 bytes going from 32 to 64 bit code.
      • -
      • Use size_t as an alias for an unsigned integral +
      • Use size_t as an alias for an unsigned integral type that can span the address space. + Array indices should be of type size_t.
      • -
      • Use ptrdiff_t as an alias for a signed integral +
      • Use ptrdiff_t as an alias for a signed integral type that can span the address space. + A type representing the difference between two pointers + should be of type ptrdiff_t.
      • -
      • The .length, .size, .sizeof, and .alignof - properties will be of type size_t. +
      • The .length, .size, .sizeof, and .alignof + properties will be of type size_t.
      +

      Endianness

      + +

      Endianness refers to the order in which multibyte types + are stored. The two main orders are big endian and + little endian. + The compiler predefines the version identifier + BigEndian or LittleEndian depending on the order + of the target system. + The x86 systems are all little endian. +

      + +

      The times when endianness matters are:

      + +
      • When reading data from an external source (like a file) + written in a different + endian format.
      • +
      • When reading or writing individual bytes of a multibyte + type like longs or doubles.
      • +
      +

      OS Specific Code

      - System specific code is handled by isolating the differences into +

      System specific code is handled by isolating the differences into separate modules. At compile time, the correct system specific module is imported. -

      - - Minor differences can be handled by constant defined in a system - specific import, and then using that constant in an if - statement. +

      +

      Minor differences can be handled by constant defined in a system + specific import, and then using that constant in an + IfStatement or StaticIfStatement. +



      diff -uNr dmd-0.177/dmd/html/d/pragma.html dmd-0.178/dmd/html/d/pragma.html --- dmd-0.177/dmd/html/d/pragma.html 2006-12-05 18:54:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/pragma.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@
      -
      Last update Tue Dec 5 18:54:29 2006 +
      Last update Sun Dec 10 22:56:55 2006
      diff -uNr dmd-0.177/dmd/html/d/pretod.html dmd-0.178/dmd/html/d/pretod.html --- dmd-0.177/dmd/html/d/pretod.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/pretod.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
      Last update Sat Dec 9 00:40:26 2006 +
      Last update Sun Dec 10 22:56:54 2006
      @@ -572,8 +572,7 @@

      The C Preprocessor Way

      - The first way is to use the #error - preprocessing directive: + The first way is to use the #error preprocessing directive:
      #if FOO || BAR
           ... code to compile ...
      @@ -583,14 +582,12 @@
       
      This has the limitations inherent in preprocessor expressions - (i.e. integer constant expressions only, no casts, no sizeof -, + (i.e. integer constant expressions only, no casts, no sizeof, no symbolic constants, etc.).

      These problems can be circumvented to some extent by defining a - static_assert - macro (thanks to M. Wilson): + static_assert macro (thanks to M. Wilson):

      #define static_assert(_x) do { typedef int ai[(_x) ? 1 : 0]; } while(0)
       
      @@ -608,8 +605,7 @@ evaluates to false. The limitations of this technique are a sometimes very confusing error message from the compiler, along with an inability - to use a static_assert - outside of a function body. + to use a static_assert outside of a function body.

      The D Way

      diff -uNr dmd-0.177/dmd/html/d/property.html dmd-0.178/dmd/html/d/property.html --- dmd-0.177/dmd/html/d/property.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/property.html 2006-12-10 22:56:56.000000000 +0100 @@ -32,7 +32,7 @@ -
      Last update Sat Dec 9 00:40:27 2006 +
      Last update Sun Dec 10 22:56:55 2006
      diff -uNr dmd-0.177/dmd/html/d/rationale.html dmd-0.178/dmd/html/d/rationale.html --- dmd-0.177/dmd/html/d/rationale.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/rationale.html 2006-12-10 22:56:58.000000000 +0100 @@ -32,7 +32,7 @@ -
      Last update Sat Dec 9 00:40:28 2006 +
      Last update Sun Dec 10 22:56:57 2006
      @@ -340,9 +340,7 @@ if the NaNs are done correctly. -

      Why use static if(0) - rather than if (0)? -

      +

      Why use static if(0) rather than if (0)?

      Some limitations are: diff -uNr dmd-0.177/dmd/html/d/regular-expression.html dmd-0.178/dmd/html/d/regular-expression.html --- dmd-0.177/dmd/html/d/regular-expression.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/regular-expression.html 2006-12-10 22:57:00.000000000 +0100 @@ -31,7 +31,7 @@ -
      Last update Sat Dec 9 00:40:28 2006 +
      Last update Sun Dec 10 22:56:58 2006
      @@ -312,8 +312,7 @@ "g"); // result: StRAp A Rocket engine on A chicken. -(toupper() - comes from std.string.) +(toupper() comes from std.string.)

      Looping

      diff -uNr dmd-0.177/dmd/html/d/statement.html dmd-0.178/dmd/html/d/statement.html --- dmd-0.177/dmd/html/d/statement.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/statement.html 2006-12-15 02:20:44.000000000 +0100 @@ -31,7 +31,7 @@ -
      Last update Sat Dec 9 00:40:27 2006 +
      Last update Fri Dec 15 02:20:41 2006
      @@ -132,31 +132,30 @@ C and C++ programmers will find the D statements very familiar, with a few interesting additions. -
      Statement:
      +
      Statement:
           ;
           NonEmptyStatement
           ScopeBlockStatement
       
      -NoScopeNonEmptyStatement:
      +NoScopeNonEmptyStatement:
           NonEmptyStatement
           BlockStatement
       
      -NoScopeStatement:
      +NoScopeStatement:
           ;
           NonEmptyStatement
           BlockStatement
       
      -NonEmptyOrScopeBlockStatement:
      +NonEmptyOrScopeBlockStatement:
           NonEmptyStatement
           ScopeBlockStatement
       
      -NonEmptyStatement:
      +NonEmptyStatement:
           LabeledStatement
           ExpressionStatement
           DeclarationStatement
           IfStatement
      -    DebugStatement
      -    VersionStatement
      +    ConditionalStatement
           WhileStatement
           DoStatement
           ForStatement
      @@ -280,8 +279,7 @@
       	The expression is evaluated.
       	

      - Expressions that have no effect, like (x + x) -, + Expressions that have no effect, like (x + x), are illegal in expression statements. If such an expression is needed, casting it to void will @@ -443,7 +441,7 @@ Expression

      -

      Initializer is executed. +

      Initialize is executed. Test is evaluated and must have a type that can be converted to a boolean. If it's true the statement is executed. After the statement is executed, @@ -459,7 +457,7 @@

      A ForStatement creates a new scope. - If Initializer declares a variable, that variable's scope + If Initialize declares a variable, that variable's scope extends through the end of the for statement. For example:

      @@ -488,7 +486,7 @@ }
      - The Initializer may be omitted. Test may also be + The Initialize may be omitted. Test may also be omitted, and if so, it is treated as if it evaluated to true.

      Foreach Statement

      @@ -496,7 +494,7 @@ A foreach statement loops over the contents of an aggregate.
      ForeachStatement:
      -    Foreach (ForeachTypeList; Aggregate) NoScopeNonEmptyStatement
      +    Foreach (ForeachTypeList; Aggregate) ScopeStatement
       
       Foreach:
           foreach
      @@ -810,10 +808,10 @@
       
      SwitchStatement:
       	switch ( Expression ) ScopeStatement
       
      -CaseStatement:
      +CaseStatement:
       	case ExpressionList : Statement
       
      -DefaultStatement:
      +DefaultStatement:
       	default: Statement
       
      @@ -1049,19 +1047,16 @@ x++;
      - The second form, goto default; -, transfers to the + The second form, goto default;, transfers to the innermost DefaultStatement of an enclosing SwitchStatement.

      - The third form, goto case; -, transfers to the + The third form, goto case;, transfers to the next CaseStatement of the innermost enclosing SwitchStatement.

      - The fourth form, goto case Expression; -, transfers to the + The fourth form, goto case Expression;, transfers to the CaseStatement of the innermost enclosing SwitchStatement with a matching Expression. @@ -1118,8 +1113,7 @@ } - Note that expression - only gets evaluated once. + Note that expression only gets evaluated once. The with statement does not change what this or super refer to.

      @@ -1410,10 +1404,10 @@ conventions:

        -
      • It must use the same tokens as the D language uses. -
      • The comment form must match the D language comments. -
      • Asm instructions are terminated by a ;, not by an - end of line. +
      • It must use the same tokens as the D language uses.
      • +
      • The comment form must match the D language comments.
      • +
      • Asm instructions are terminated by a ;, not by an + end of line.
      These rules exist to ensure that D source code can be tokenized diff -uNr dmd-0.177/dmd/html/d/struct.html dmd-0.178/dmd/html/d/struct.html --- dmd-0.177/dmd/html/d/struct.html 2006-12-06 13:29:00.000000000 +0100 +++ dmd-0.178/dmd/html/d/struct.html 2006-12-10 22:56:56.000000000 +0100 @@ -31,7 +31,7 @@ -
      Last update Wed Dec 6 13:28:58 2006 +
      Last update Sun Dec 10 22:56:55 2006
      @@ -131,7 +131,8 @@

      Whereas classes are reference types, structs are value types. Any C struct can be exactly represented as a D struct. - In C++ parlance, a D struct is a POD (Plain Old Data) type, + In C++ parlance, a D struct is a + POD (Plain Old Data) type, with a trivial constructors and destructors. Structs and unions are meant as simple aggregations of data, or as a way to paint a data structure over hardware or an external type. External @@ -438,11 +439,9 @@ S s = t; // s.a is set to 3 -

      If opCall - is overridden for the struct, and the struct +

      If opCall is overridden for the struct, and the struct is initialized with a value that is of a different type, - then the opCall - operator is called:

      + then the opCall operator is called:

      struct S
       {   int a;
      diff -uNr dmd-0.177/dmd/html/d/template.html dmd-0.178/dmd/html/d/template.html
      --- dmd-0.177/dmd/html/d/template.html	2006-12-05 18:54:32.000000000 +0100
      +++ dmd-0.178/dmd/html/d/template.html	2006-12-14 21:31:38.000000000 +0100
      @@ -32,7 +32,7 @@
       	
       	
       
      -	
      Last update Tue Dec 5 18:54:29 2006 +
      Last update Thu Dec 14 21:31:36 2006
      @@ -303,94 +303,6 @@
      int i;
       TCopy!(int).copy(i, 3);
       
      -

      Instantiation Scope

      @@ -437,32 +349,33 @@

      Argument Deduction

      - The types of template parameters are deduced for a particular +

      The types of template parameters are deduced for a particular template instantiation by comparing the template argument with the corresponding template parameter. -

      +

      - For each template parameter, the following rules are applied in +

      For each template parameter, the following rules are applied in order until a type is deduced for each parameter: +

        -
      1. If there is no type specialization for the parameter, - the type of the parameter is set to the template argument. +
      2. If there is no type specialization for the parameter, + the type of the parameter is set to the template argument.
      3. -
      4. If the type specialization is dependent on a type parameter, +
      5. If the type specialization is dependent on a type parameter, the type of that parameter is set to be the corresponding part - of the type argument. + of the type argument.
      6. -
      7. If after all the type arguments are examined there are any +
      8. If after all the type arguments are examined there are any type parameters left with no type assigned, they are assigned types corresponding to the template argument in the same position - in the TemplateArgumentList. + in the TemplateArgumentList.
      9. -
      10. If applying the above rules does not result in exactly one - type for each template parameter, then it is an error. +
      11. If applying the above rules does not result in exactly one + type for each template parameter, then it is an error.
      - For example: +

      For example:

      template TFoo(T) { }
       alias TFoo!(int) Foo1;		// (1) T is deduced to be int
      @@ -497,8 +410,9 @@
       
       

      Value Parameters

      - This example of template foo has a value parameter that +

      This example of template foo has a value parameter that is specialized for 10: +

      template foo(U : int, int T : 10)
       {
      @@ -514,10 +428,11 @@
       
       

      Specialization

      - Templates may be specialized for particular types of arguments +

      Templates may be specialized for particular types of arguments by following the template parameter identifier with a : and the specialized type. For example: +

      template TFoo(T)        { ... } // #1
       template TFoo(T : T[])  { ... } // #2
      @@ -531,18 +446,20 @@
       alias TFoo!(char, int, int) foo4; // instantiates #4
       
      - The template picked to instantiate is the one that is most specialized +

      The template picked to instantiate is the one that is most specialized that fits the types of the TemplateArgumentList. Determine which is more specialized is done the same way as the C++ partial ordering rules. If the result is ambiguous, it is an error. +

      -

      Alias Parameters

      +

      Alias Parameters

      - Alias parameters enable templates to be parameterized with +

      Alias parameters enable templates to be parameterized with any type of D symbol, including global names, local names, type names, module names, template names, and template instance names. It is a superset of the uses of template template parameters in C++. +

      • Global names @@ -646,7 +563,8 @@

        Template Parameter Default Values

        - Trailing template parameters can be given default values: +

        Trailing template parameters can be given default values: +

        template Foo(T, U = int) { ... }
         Foo!(uint,long); // instantiate Foo with T as uint, and U as long
        @@ -658,9 +576,10 @@
         
         

        Implicit Template Properties

        - If a template has exactly one member in it, and the name of that +

        If a template has exactly one member in it, and the name of that member is the same as the template name, that member is assumed to be referred to in a template instantiation: +

        template Foo(T)
         {
        @@ -800,8 +719,9 @@
             class Identifier ( TemplateParameterList ) [SuperClass {, InterfaceClass }] ClassBody
         
        - If a template declares exactly one member, and that member is a class +

        If a template declares exactly one member, and that member is a class with the same name as the template: +

        template Bar(T)
         {
        @@ -812,8 +732,9 @@
         }
         
        - then the semantic equivalent, called a ClassTemplateDeclaration +

        then the semantic equivalent, called a ClassTemplateDeclaration can be written as: +

        class Bar(T)
         {
        @@ -823,8 +744,9 @@
         
         

        Function Templates

        - If a template declares exactly one member, and that member is a function +

        If a template declares exactly one member, and that member is a function with the same name as the template: +

        FunctionTemplateDeclaration:
             Type Identifier ( TemplateParameterList ) ( FunctionParameterList ) FunctionBody
        @@ -838,21 +760,23 @@
         }
         
        - Function templates can be explicitly instantiated with a +

        Function templates can be explicitly instantiated with a !(TemplateArgumentList): +

        writefln("The square of %s is %s", 3, Square!(int)(3));
         
        - or implicitly, where the TemplateArgumentList is deduced +

        or implicitly, where the TemplateArgumentList is deduced from the types of the function arguments: +

        writefln("The square of %s is %s", 3, Square(3));  // T is deduced to be int
         
        - Function template type parameters that are to be implicitly +

        Function template type parameters that are to be implicitly deduced may not have specializations: - +

        void Foo(T : T*)(T t) { ... }
         
        @@ -861,7 +785,8 @@
         Foo(&y);         // error, T has specialization
         
        - Template arguments not implicitly deduced can have default values: +

        Template arguments not implicitly deduced can have default values: +

        void Foo(T, U=T*)(T t) { U p; ... }
         
        @@ -872,9 +797,10 @@
         
         

        Recursive Templates

        - Template features can be combined to produce some interesting +

        Template features can be combined to produce some interesting effects, such as compile time evaluation of non-trivial functions. For example, a factorial template can be written: +

        template factorial(int n : 1)
         {
        @@ -894,9 +820,10 @@
         
         

        Limitations

        - Templates cannot be used to add non-static members or functions +

        Templates cannot be used to add non-static members or functions to classes. For example: +

        class Foo
         {
        @@ -911,7 +838,8 @@
         }
         
        - Templates cannot be declared inside functions. +

        Templates cannot be declared inside functions. +

        diff -uNr dmd-0.177/dmd/html/d/templates-revisited.html dmd-0.178/dmd/html/d/templates-revisited.html --- dmd-0.177/dmd/html/d/templates-revisited.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/templates-revisited.html 2006-12-10 22:56:58.000000000 +0100 @@ -33,7 +33,7 @@
      -
      Last update Sat Dec 9 00:40:28 2006 +
      Last update Sun Dec 10 22:56:57 2006
      @@ -254,10 +254,8 @@

      are syntactically ambiguous, both to the compiler and the programmer. -If you run across a<b,c>d; - in unfamiliar code, you've got to slog through -an arbitrarily large amount of declarations and .h - files to figure out +If you run across a<b,c>d; in unfamiliar code, you've got to slog through +an arbitrarily large amount of declarations and .h files to figure out if it is a template or not. How much effort has been expended by programmers, compiler writers, and language standard writers to deal with this? @@ -278,8 +276,7 @@

      is syntactically unambiguous. This makes it easy to parse, easy to generate reasonable error messages for, and makes it easy for someone inspecting the -code to determine that yes, a - must be a template. +code to determine that yes, a must be a template.

      @@ -316,8 +313,7 @@
      }
      -

      The Foo - forms a name space for the templates, which are accessed by, +

      The Foo forms a name space for the templates, which are accessed by, for example:

      @@ -365,8 +361,7 @@ Because D has a true module system, rather than textual #include files, there are only template definitions in D. The need for template declarations and export is irrelevant. For example, given a template definition in -module A -: +module A:

      module A;
      @@ -377,8 +372,7 @@
       }
       
      -

      it can be accessed from module B - like: +

      it can be accessed from module B like:

      module B;
      @@ -599,15 +593,11 @@
       

      reducing 13 lines of code to an arguably much cleaner 7 lines. -static if -'s are the equivalent of C++'s #if -. -But #if - cannot access template +static if's are the equivalent of C++'s #if. +But #if cannot access template arguments, so all template conditional compilation must be handled with partial and explicitly specialized templates. -static if - dramatically simplifies +static if dramatically simplifies such constructions.

      @@ -640,22 +630,13 @@ }
      -

      Template IsFunctionT - relies on two side effects to achieve its result. +

      Template IsFunctionT relies on two side effects to achieve its result. First, it relies on arrays of functions being an invalid C++ type. -Thus, if U - is a function type, the second test - will not be selected -since to do so would cause an error (SFINAE). The first test - will be selected. -If U - is not a function type, the second test - is a better fit than ... . -Next, it is determined which test - was selected by examining the size -of the return value, i.e. sizeof(One) - or sizeof(Two) -. +Thus, if U is a function type, the second test will not be selected +since to do so would cause an error (SFINAE). The first test will be selected. +If U is not a function type, the second test is a better fit than ... . +Next, it is determined which test was selected by examining the size +of the return value, i.e. sizeof(One) or sizeof(Two). Unfortunately, template metaprogramming in C++ often seems to be relying on side effects rather than being able to expressly code what is desired.

      @@ -679,15 +660,10 @@ } -

      The is(T[]) - is the equivalent of SFINAE. -It tries to build an array of T -, -and if T - is a function type, it is an array of functions. Since this is -an invalid type, the T[] - fails and is(T[]) - returns false. +

      The is(T[]) is the equivalent of SFINAE. +It tries to build an array of T, +and if T is a function type, it is an array of functions. Since this is +an invalid type, the T[] fails and is(T[]) returns false.

      Although SFINAE can be used, the is expressions can test a type directly, @@ -706,8 +682,7 @@

      Let's move on to things that are impractical with templates in C++. For example, this template returns the square root of -real number x - using the Babylonian method: +real number x using the Babylonian method:

      import std.stdio;
      diff -uNr dmd-0.177/dmd/html/d/tuple.html dmd-0.178/dmd/html/d/tuple.html
      --- dmd-0.177/dmd/html/d/tuple.html	2006-12-05 18:54:34.000000000 +0100
      +++ dmd-0.178/dmd/html/d/tuple.html	2006-12-10 22:57:00.000000000 +0100
      @@ -34,7 +34,7 @@
       	
       	
       
      -	
      Last update Tue Dec 5 18:54:32 2006 +
      Last update Sun Dec 10 22:56:58 2006
      diff -uNr dmd-0.177/dmd/html/d/type.html dmd-0.178/dmd/html/d/type.html --- dmd-0.177/dmd/html/d/type.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/type.html 2006-12-15 12:19:44.000000000 +0100 @@ -32,85 +32,151 @@ -
      Last update Sat Dec 9 00:40:27 2006 +
      Last update Fri Dec 15 12:19:42 2006
      -$(SPEC_S Types, + +
      +

      Types

      +

      Basic Data Types

      - $(TABLE1 - +
      Keyword Description Default Initializer (.init) -
      void - no type - -
      bool - boolean value false -
      byte - signed 8 bits 0 -
      ubyte - unsigned 8 bits 0 -
      short - signed 16 bits 0 -
      ushort - unsigned 16 bits 0 -
      int - signed 32 bits 0 -
      uint - unsigned 32 bits 0 -
      long - signed 64 bits 0L -
      ulong - unsigned 64 bits 0L -
      cent - signed 128 bits (reserved for future use) 0 -
      ucent - unsigned 128 bits (reserved for future use) 0 -
      float - 32 bit floating point float.nan -
      double - 64 bit floating point double.nan +
      void no type - +
      bool boolean value false +
      byte signed 8 bits 0 +
      ubyte unsigned 8 bits 0 +
      short signed 16 bits 0 +
      ushort unsigned 16 bits 0 +
      int signed 32 bits 0 +
      uint unsigned 32 bits 0 +
      long signed 64 bits 0L +
      ulong unsigned 64 bits 0L +
      cent signed 128 bits (reserved for future use) 0 +
      ucent unsigned 128 bits (reserved for future use) 0 +
      float 32 bit floating point float.nan +
      double 64 bit floating point double.nan
      real - largest hardware implemented floating point size (Implementation Note: 80 bits for Intel CPUs) real.nan
      ifloat - imaginary float float.nan * 1.0i
      idouble - imaginary double double.nan * 1.0i
      ireal - imaginary real real.nan * 1.0i
      cfloat - a complex number of two float values float.nan + float.nan * 1.0i
      cdouble - complex double double.nan + double.nan * 1.0i
      creal - complex real real.nan + real.nan * 1.0i -
      $(TT char unsigned 8 bit UTF-8 0xFF -
      wchar unsigned 16 bit UTF-16 0xFFFF -
      dchar unsigned 32 bit UTF-32 0x0000FFFF - - +
      char unsigned 8 bit UTF-8 0xFF +
      wchar unsigned 16 bit UTF-16 0xFFFF +
      dchar unsigned 32 bit UTF-32 0x0000FFFF +

      Derived Data Types

      @@ -134,6 +200,18 @@
    15. class +

      Base Types

      + +

      The base type of an enum is the type it is based on:

      + +
      enum E : T { ... }	// T is the base type of E
      +
      + +

      The base type of a typedef is the type it is formed from:

      + +
      typedef T U;		// T is the base type of U
      +
      +

      Pointer Conversions

      Casting pointers to non-pointers and vice versa is allowed in D, @@ -142,14 +220,11 @@

      Implicit Conversions

      - - D has a lot of types, both built in and derived. - It would be tedious to require casts for every - type conversion, so implicit conversions step in - to handle the obvious ones automatically. + Implicit conversions are used to automatically convert + types as required.

      - A typedef can be implicitly converted to its underlying + A typedef or enum can be implicitly converted to its base type, but going the other way requires an explicit conversion. For example: @@ -206,7 +281,7 @@ operators to a common type. The operands must already be of arithmetic types. The following rules are applied - in order, looking at the base type (looking past typedefs): + in order, looking at the base type:

      1. If either operand is real, the other operand is converted to real. @@ -233,14 +308,14 @@
    -

    If one or both of the operand types is a typedef after +

    If one or both of the operand types is a typedef or enum after undergoing the above conversions, the result type is:

    1. If the operands are the same type, the result will be the that type.
    2. -
    3. If one operand is a typedef and the other is the base type - of that typedef, the result is the base type.
    4. -
    5. If the two operands are different typedefs but of the same +
    6. If one operand is a typedef or enum and the other is the base type + of that typedef or enum, the result is the base type.
    7. +
    8. If the two operands are different typedefs or enums but of the same base type, then the result is that base type.
    @@ -329,7 +404,24 @@ dg(3); // call o.member(3) - + + +

    +

    + + + + + + diff -uNr dmd-0.177/dmd/html/d/variadic-function-templates.html dmd-0.178/dmd/html/d/variadic-function-templates.html --- dmd-0.177/dmd/html/d/variadic-function-templates.html 2006-12-05 18:54:34.000000000 +0100 +++ dmd-0.178/dmd/html/d/variadic-function-templates.html 2006-12-10 22:57:00.000000000 +0100 @@ -33,7 +33,7 @@ -
    Last update Tue Dec 5 18:54:32 2006 +
    Last update Sun Dec 10 22:56:58 2006
    diff -uNr dmd-0.177/dmd/html/d/version.html dmd-0.178/dmd/html/d/version.html --- dmd-0.177/dmd/html/d/version.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/version.html 2006-12-15 12:19:44.000000000 +0100 @@ -32,7 +32,7 @@ -
    Last update Sat Dec 9 00:40:27 2006 +
    Last update Fri Dec 15 12:19:42 2006
    @@ -150,8 +150,8 @@ Declaration Declarations ConditionalStatement: - Condition Statement - Condition Statement else Statement + Condition NoScopeNonEmptyStatement + Condition NoScopeNonEmptyStatement else NoScopeNonEmptyStatement If the Condition is satisfied, then the following @@ -316,9 +316,7 @@ These are presumably set by the command line as - -version=n - and -version=identifier -. + -version=n and -version=identifier. @@ -448,9 +446,7 @@ These are presumably set by the command line as - -debug=n - and -debug=identifier -. + -debug=n and -debug=identifier.

    Static If Condition

    @@ -525,7 +521,7 @@ -

    Static Assert

    +

    Static Assert

    StaticAssert:
         static assert ( AssignExpression );
    diff -uNr dmd-0.177/dmd/html/d/warnings.html dmd-0.178/dmd/html/d/warnings.html
    --- dmd-0.177/dmd/html/d/warnings.html	2006-12-09 00:40:30.000000000 +0100
    +++ dmd-0.178/dmd/html/d/warnings.html	2006-12-10 22:56:58.000000000 +0100
    @@ -31,7 +31,7 @@
     	
     	
     
    -	
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:57 2006
    @@ -247,10 +247,8 @@ that bypasses type checking, this can mask another bug that could be introduced if the types of a, b or c change in the future, or if their types are set by a template - instantiation. (In generic code, the cast(byte) - would - probably be cast(typeof(a)) -). + instantiation. (In generic code, the cast(byte) would + probably be cast(typeof(a))).
  • Changing the type of a to int. This is generally a better solution, but of course may not work @@ -275,7 +273,6 @@
  • Add a new construct, implicit_cast(type)expression - that is a restricted form of the general cast, and will only work where implicit casts would normally be allowed. @@ -465,8 +462,7 @@ to accidentally omit a case, or to add a new value in one part of the program and overlook adding a case for it in another part. Although D will catch this error at runtime by throwing - an instance of std.switcherr.SwitchError -, some prefer at least + an instance of std.switcherr.SwitchError, some prefer at least a warning so such errors can be caught at compile time.

    @@ -517,8 +513,7 @@ }

  • -
  • Putting the dead code inside a version(none) - conditional: +
  • Putting the dead code inside a version(none) conditional:
    int foo(int i)
     {
         return i;
    diff -uNr dmd-0.177/dmd/html/d/wc.html dmd-0.178/dmd/html/d/wc.html
    --- dmd-0.177/dmd/html/d/wc.html	2006-12-05 18:54:32.000000000 +0100
    +++ dmd-0.178/dmd/html/d/wc.html	2006-12-10 22:56:58.000000000 +0100
    @@ -32,7 +32,7 @@
     	
     	
     
    -	
    Last update Tue Dec 5 18:54:30 2006 +
    Last update Sun Dec 10 22:56:56 2006
    diff -uNr dmd-0.177/dmd/html/d/windbg.html dmd-0.178/dmd/html/d/windbg.html --- dmd-0.177/dmd/html/d/windbg.html 2006-12-09 00:40:30.000000000 +0100 +++ dmd-0.178/dmd/html/d/windbg.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Sat Dec 9 00:40:28 2006 +
    Last update Sun Dec 10 22:56:57 2006
    diff -uNr dmd-0.177/dmd/html/d/windows.html dmd-0.178/dmd/html/d/windows.html --- dmd-0.177/dmd/html/d/windows.html 2006-12-09 00:40:28.000000000 +0100 +++ dmd-0.178/dmd/html/d/windows.html 2006-12-10 22:56:58.000000000 +0100 @@ -31,7 +31,7 @@ -
    Last update Sat Dec 9 00:40:27 2006 +
    Last update Sun Dec 10 22:56:56 2006
    @@ -232,19 +232,15 @@ Windows GUI applications can be written with D. A sample such can be found in \dmd\samples\d\winsamp.d -

    These are required:

      -
    1. Instead of a main - function serving as the entry point, - a WinMain - function is needed. +
    2. Instead of a main function serving as the entry point, + a WinMain function is needed. -
    3. WinMain - must follow this form: +
    4. WinMain must follow this form:
      import std.c.windows.windows;
       
       extern (C) void gc_init();
      @@ -295,10 +291,8 @@
       }
       
      - The myWinMain() - function is where the user code goes, the - rest of WinMain - is boilerplate to initialize and shut down + The myWinMain() function is where the user code goes, the + rest of WinMain is boilerplate to initialize and shut down the D runtime system.
    5. A .def @@ -314,8 +308,7 @@ Without those, Win32 will open a text console window whenever the application is run. -
    6. The presence of WinMain() - is recognized by the compiler +
    7. The presence of WinMain() is recognized by the compiler causing it to emit a reference to __acrtused_dll and the phobos.lib runtime library.