Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Bright committed Jul 8, 2008
1 parent 66b3ba6 commit 1b0a258
Show file tree
Hide file tree
Showing 14 changed files with 284 additions and 66 deletions.
59 changes: 57 additions & 2 deletions changelog.dd
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,61 @@ $(UL
$(LI $(LINK2 http://www.digitalmars.com/pnews/index.php?category=2, tech support))
)

$(VERSION 016, Jun 19, 2008, =================================================,

$(WHATSNEW
$(LI $(BUGZILLA 288): changed return type of $(B opEquals) from int
to bool. This necessitates doing a grep for opEquals and
$(RED changing all the return values).
)
$(LI Added $(B .__vptr) and $(B .__monitor) properties for class objects
for use in the internal runtime library.
)
)
$(BUGSFIXED
$(LI $(NG_digitalmars_D_announce 12322): mixin regression)
$(LI $(BUGZILLA 203): std.format.doFormat() pads width incorrectly on Unicode strings)
$(LI $(BUGZILLA 211): Linking error with alias mixin params and anonymous methods)
$(LI $(BUGZILLA 224): Incorrect warning "no return at end of function")
$(LI $(BUGZILLA 252): -w and switch returns = bogus "no return at end of function" warning)
$(LI $(BUGZILLA 253): Invalid <dl> tag generated by Ddoc)
$(LI $(BUGZILLA 294): DDoc: Function templates get double and incomplete documentation)
$(LI $(BUGZILLA 398): No way to abort compilation in a doubly recursive mixin)
$(LI $(BUGZILLA 423): dmd ignores empty commandline arguments)
$(LI $(BUGZILLA 515): Spec incorrect in where .offsetof can be applied)
$(LI $(BUGZILLA 520): Invariants allowed to call public functions)
$(LI $(BUGZILLA 542): Function parameter of a deprecated type (other than a class) is not caught)
$(LI $(BUGZILLA 543): Function return of a deprecated type is not caught)
$(LI $(BUGZILLA 544): Variable declared of a deprecated type (other than a class) is not caught)
$(LI $(BUGZILLA 545): Attempt to access a static built-in property of a deprecated struct, union, enum or typedef is not caught)
$(LI $(BUGZILLA 547): Accessing a deprecated member variable through an explicit object reference is not caught)
$(LI $(BUGZILLA 548): Accessing a value of a deprecated enum is not caught)
$(LI $(BUGZILLA 566): Adding non-static members and functions to classes using a template doesn't error)
$(LI $(BUGZILLA 570): Bogus recursive mixin error)
$(LI $(BUGZILLA 571): class instance member template returns strange value)
$(LI $(BUGZILLA 572): parse error when using template instantiation with typeof)
$(LI $(BUGZILLA 581): Error message w/o line number in dot-instantiated template)
$(LI $(BUGZILLA 617): IFTI doesn't use normal promotion rules for non-template parameters)
$(LI $(BUGZILLA 870): contradictory error messages for templates)
$(LI $(BUGZILLA 951): Missing line number: no constructor provided for a class derived from a class with no default constructor)
$(LI $(BUGZILLA 1097): Missing line number: casting array to array of different element size)
$(LI $(BUGZILLA 1158): Missing line number: invalid mixin outside function scope)
$(LI $(BUGZILLA 1176): Error missing file and line number)
$(LI $(BUGZILLA 1187): Segfault with syntax error in two-level mixin.)
$(LI $(BUGZILLA 1194): fcmov* emmits incorrect code)
$(LI $(BUGZILLA 1207): Documentation on destructors is confusing)
$(LI $(BUGZILLA 1341): typeof(int) should probably be legal)
$(LI $(BUGZILLA 1601): shr and shl error message is missing line numbers)
$(LI $(BUGZILLA 1612): No file/line number for using an undefined label in inline assembly)
$(LI $(BUGZILLA 1912): Error without line number (Tuple, invalid value argument))
$(LI $(BUGZILLA 1936): Error with no line number (array dimension overflow))
$(LI $(BUGZILLA 2076): asm: offset has wrong docs and error without line number)
$(LI $(BUGZILLA 2161): Modify compiler to pass array TypeInfo to _adEq and _adCmp instead of element TypeInfo)
$(LI $(BUGZILLA 2178): 3 errors without line number: typeof)
$(LI $(BUGZILLA 2188): man-or-boy test fails with access violation)
)
)

$(VERSION 015, Jun 17, 2008, =================================================,

$(WHATSNEW
Expand All @@ -43,17 +98,17 @@ $(VERSION 015, Jun 17, 2008, =================================================,
$(LINK2 function.html#function-overloading, overloading).)
$(LI Relaxed hidden hijacking detection when hidden function is disjoint
from overloading with any other virtual function in the
$(LINK2 function.html#function-inheritance, heirarchy).)
$(LINK2 function.html#function-inheritance, hierarchy).)
$(LI Added $(LINK2 version.html#PredefinedVersions, version identifier
$(B D_PIC)) when $(B -fPIC) switch is used.)
$(LI Added $(LINK2 template.html#Constraint, $(I Constraint)s) to
templates.)
)
$(BUGSFIXED
$(LI $(BUGZILLA 617): IFTI doesn't use normal promotion rules for non-template parameters)
$(LI $(BUGZILLA 1383): Implicit Function Instantiation with typesafe-variadic of delegates doesn't work)
$(LI $(BUGZILLA 1559): version statement makes code outside of it disappear)
$(LI $(BUGZILLA 1675): "Identifier too long" error with OMF object files)
$(LI $(BUGZILLA 1947): ICE (Assertion failure: '0' on statement.c:123) with null mixin)
$(LI $(BUGZILLA 1963): -H creates broken headers)
$(LI $(BUGZILLA 2098): Outdated docs)
$(LI $(BUGZILLA 2099): Text and Sample Code Disagree (non-static local invariant declaration))
Expand Down
56 changes: 29 additions & 27 deletions class.dd
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ Foo var;

The $(B .offsetof) property gives the offset in bytes of the field
from the beginning of the class instantiation.
$(B .offsetof) can only be applied to fields qualified with the
type of the class, not expressions which produce the type of
the field itself:
$(B .offsetof) can only be applied to
not expressions which produce the type of
the field itself, not the class type:

------
class Foo
Expand All @@ -157,8 +157,8 @@ void test(Foo foo)
{
size_t o;

o = Foo.x$(B .offsetof); // yields 8
o = foo.x$(B .offsetof); // error, .offsetof an int type
o = Foo.x$(B .offsetof); // error, Foo.x needs a 'this' reference
o = foo.x$(B .offsetof); // ok
}
------

Expand All @@ -180,6 +180,11 @@ void test(Foo foo)
}
---

$(P The properties $(B .__vptr) and $(B .__monitor) give access
to the class object's vtbl[] and monitor, respectively, but
should not be used in user code.
)

<h3>Super Class</h3>

All classes inherit from a super class. If one is not specified,
Expand Down Expand Up @@ -388,48 +393,45 @@ class Foo
}
------

There can be only one destructor per class, the destructor
$(P There can be only one destructor per class, the destructor
does not have any parameters,
and has no attributes. It is always virtual.
<p>
)

The destructor is expected to release any resources held by the object.
<p>
$(P The destructor is expected to release any resources held by the
object.
)

The program can explicitly inform the garbage collector that an
$(P The program can explicitly inform the garbage collector that an
object is no longer referred to (with the delete expression), and
then the garbage collector calls the destructor
immediately, and adds the object's memory to the free storage.
The destructor is guaranteed to never be called twice.
<p>
)

The destructor for the super class automatically gets called when
$(P The destructor for the super class automatically gets called when
the destructor ends. There is no way to call the super destructor
explicitly.
<p>
)

When the garbage collector calls a destructor for an object of a class
$(P The garbage collector is not guaranteed to run the destructor
for all unreferenced objects. Furthermore, the order in which the
garbage collector calls destructors for unreference objects
is not specified.
This means that
when the garbage collector calls a destructor for an object of a class
that has
members that are references to garbage collected objects, those
references are no longer valid. This means that destructors
references may no longer be valid. This means that destructors
cannot reference sub objects.
This is because that the garbage collector does not collect objects
in any guaranteed order, so there is no guarantee that any pointers
or references to any other garbage collected objects exist when the garbage
collector runs the destructor for an object.
This rule does not apply to auto objects or objects deleted
with the $(I DeleteExpression), as the destructor is not being run
by the garbage collector, meaning all references are valid.
<p>

The garbage collector is not guaranteed to run the destructor
for all unreferenced objects. Furthermore, the order in which the
garbage collector calls destructors for unreference objects
is not specified.
<p>
)

Objects referenced from the data segment never get collected
$(P Objects referenced from the data segment never get collected
by the gc.
)

<h3>Static Constructors</h3>

Expand Down
7 changes: 6 additions & 1 deletion comparison.dd
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,12 @@ $(COMMUNITY $(D) vs Other Languages,
$(TD Variadic Template Parameters)
$(YES1 template.html)
)

$(V2
$(TR
$(TD Template Constraints)
$(YES1 concepts.html)
)
)
$(TR
$(TD <a href="#mixins">Mixins</a>)
$(YES1 template-mixin.html)
Expand Down
99 changes: 98 additions & 1 deletion cpp0x.dd
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,104 @@ $(SECTION3 $(LNAME2 member-initializers, Member Initializers),

$(SECTION3 $(LNAME2 concepts, Concepts (unified proposal)),

$(P $(LINK2 $(NDOCS)2006/n2081.pdf, N2081): TBD
$(P $(LINK2 $(NDOCS)2006/n2081.pdf, N2081):
The D equivalent of C++ concepts are $(LINK2 concepts.html, constraints).
)

$(TABLE2 Concepts and Constraints,

$(TR
$(TH Description)
$(TH D Constraints)
$(TH C++0x Concepts)
)

$(TR
$(TD Overloading based on concepts/constraints)
$(TD Yes)
$(TD Yes)
)

$(TR
$(TD Concepts/constraints on template type parameters)
$(TD Yes)
$(TD Yes)
)

$(TR
$(TD Concepts/constraints on template value parameters)
$(TD Yes)
$(TD No)
)

$(TR
$(TD Concepts/constraints on template template/alias parameters)
$(TD Yes)
$(TD No)
)

$(TR
$(TD Composition and refinement of concepts/constraints)
$(TD Yes)
$(TD Yes)
)

$(TR
$(TD Multi-type concepts/constraints)
$(TD Yes)
$(TD Yes)
)

$(TR
$(TD Expression of concepts/constraints)
$(TD Done with compile time expressions)
$(TD Done by enumeration of function signatures)
)

$(TR
$(TD Axioms)
$(TD Yes (as static asserts and function preconditions))
$(TD Yes)
)

$(TR
$(TD new keywords)
$(TD No)
$(TD Yes: where, concept, concept_map, axiom, late_check)
)

$(TR
$(TD Semantic analysis of template bodies)
$(TD Lazy (done at instantiation time))
$(TD Eager (done at definition time))
)

$(TR
$(TD Template body checked against concept/constraint)
$(TD No)
$(TD Yes)
)

$(TR
$(TD Concept maps)
$(TD No (but could be done with proxy objects))
$(TD Yes)
)

$(TR
$(TD All operations on constrained types must be specified in
concept/constraint)
$(TD No)
$(TD Yes)
)

$(TR
$(TD Complexity)
$(TD $(CODE if (expression)) added to template grammar)
$(TD quite a bit of new grammar and semantics added)
)


)

)
Expand Down
4 changes: 4 additions & 0 deletions dcompiler.dd
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,10 @@ $(WINDOWS
)
)

$(WINDOWS
$(P Empty switches, i.e. "", are ignored.)
)

<h2>$(LNAME2 linking, Linking)</h2>

$(P Linking is done directly by the $(B dmd) compiler after a successful
Expand Down
18 changes: 10 additions & 8 deletions doc.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DDOC=
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="$(META_KEYWORDS)" />
<meta name="description" content="$(META_DESCRIPTION)" />
<title>$(TITLE) - D Programming Language 2.0 - Digital Mars</title>
<title>$(TITLE) - D Programming Language $(VER) - Digital Mars</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
<link rel="shortcut icon" href="favicon.ico" />
Expand All @@ -21,7 +21,7 @@ DDOC=
<body>
<div id="heading">
<a href="http://www.digitalmars.com/"><img src="dmlogo.gif" width="270" height="53" style="border-style:none" alt="www.digitalmars.com" align="left"></a>
<p align="right">D Programming Language 2.0</p>
<p align="right">D Programming Language $(VER)</p>
<br>

<div id="headingNav">
Expand Down Expand Up @@ -78,7 +78,7 @@ Copyright &copy; 1999-$(YEAR) by Digital Mars, All Rights Reserved
FOOTER=
<div id="copyright">
$(COPYRIGHT) |
Page generated by $(LINK2 http://www.digitalmars.com/d/2.0/ddoc.html, Ddoc). |
Page generated by $(LINK2 http://www.digitalmars.com/d/$(VER)/ddoc.html, Ddoc). |
<a href="http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/$(WIKI)" title="Read/write comments and feedback">Comments</a>
</div>

Expand All @@ -88,7 +88,7 @@ TOP=
<div id="searchbox">
<input id="q" name="q" size="10" value="Search" onFocus='if(this.value == "Search"){this.value="";}'>
<input type="hidden" id="domains" name="domains" value="www.digitalmars.com">
<input type="hidden" id="sitesearch" name="sitesearch" value="www.digitalmars.com/d/2.0">
<input type="hidden" id="sitesearch" name="sitesearch" value="www.digitalmars.com/d/$(VER)">
<input type="hidden" id="sourceid" name="sourceid" value="google-search">
<input type="submit" id="submit" name="submit" value="Go">
</div>
Expand Down Expand Up @@ -179,7 +179,7 @@ NAVIGATION_D=
$(TOCENTRYT wc.html, wc - the wordcount program, Example: wc)
$(TOCENTRYT future.html, Future directions, Future)
$(TOCENTRYT changelog.html, History of changes to D, D Change Log)
$(TOCENTRYT features2.html, Language changes for D 2.0, 2.0 Features)
$(TOCENTRYT features2.html, Language changes for D $(VER), $(VER) Features)
$(TOCENTRYT http://www.digitalmars.com/techtips/index.html, Programming tips, Tech Tips)
$(TOCENTRYT rationale.html, Answers to questions about D design decisions, Rationale)
$(TOCENTRYT warnings.html, Explanation of D compiler generated warning messages, Warnings)
Expand Down Expand Up @@ -224,7 +224,8 @@ NAVIGATION_D=
<div class="navblock">
<h2>Community</h2>
$(UL
$(TOCENTRYT http://d.puremagic.com/conference2007/, D Programming Language Conference, D Conference)
$(TOCENTRYT http://d.puremagic.com/conference2008/, D Programming Language Conference, D Conference)
$(TOCENTRYT http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage, Wiki for the D Programming Language, D Wiki)
$(TOCENTRYX http://www.digitalmars.com/d/dnews.html, News Digest)
$(TOCENTRYT http://www.digitalmars.com/NewsGroup.html, How to connect to D newsgroups, News)
$(TOCENTRYT $(NEWSGROUP digitalmars.D), Forum for general D topics, D forum)
Expand Down Expand Up @@ -297,8 +298,8 @@ TRANSLATIONS=
<div class="navblock">
<h2>Translations</h2>
$(UL
$(TOCENTRY http://www.digitalmars.com/d/2.0/$(DOCFILENAME), English)
$(TOCENTRY http://64.233.179.104/translate_c?hl=en&ie=UTF-8&oe=UTF-8&langpair=en%7Cde&u=http://www.digitalmars.com/d/2.0/$(DOCFILENAME), German)
$(TOCENTRY http://www.digitalmars.com/d/$(VER)/$(DOCFILENAME), English)
$(TOCENTRY http://64.233.179.104/translate_c?hl=en&ie=UTF-8&oe=UTF-8&langpair=en%7Cde&u=http://www.digitalmars.com/d/$(VER)/$(DOCFILENAME), German)
)
</div>
TRANSLATIONS=
Expand Down Expand Up @@ -391,6 +392,7 @@ META_DESCRIPTION=D Programming Language
ACRONYM=<acronym title="$+">$1</acronym> ($+)
SFINAE=$(LINK2 glossary.html#sfinae, $(ACRONYM SFINAE, Substitution Failure Is Not An Error))
COMMA=,
VER=2.0
V1=
V2=$0
DIGG=<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
Expand Down
Loading

0 comments on commit 1b0a258

Please sign in to comment.