Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andralex committed Dec 11, 2011
1 parent 883024c commit 086d56d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions comparison.dd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Ddoc

$(COMMUNITY $(D) vs Other Languages,
$(COMMUNITY $(B D) vs Other Languages,

$(BLOCKQUOTE William Nerdspeare,
To D, or not to D.
)

$(P This table is a quick and rough list of various features of
$(D)
$(B D)
that can be used to compare with other languages.
While many capabilities are available with standard libraries, this
table is for features built in to the core language itself.
Expand All @@ -20,7 +20,7 @@ $(COMMUNITY $(D) vs Other Languages,
<thead>
$(TR
<th>Feature</th>
<th align="center"><a href="index.html" title="D Programming Language" target="_top">$(D)</a></th>
<th align="center"><a href="index.html" title="D Programming Language" target="_top">$(B D)</a></th>
)
</thead>

Expand Down
7 changes: 4 additions & 3 deletions doc.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,6 @@ TOCENTRYT = $(LI <a href="$1" title="$2">$3</a>)
TOCENTRYH = $(LI $(LINK2 $1, $2)$3)
TOCENTRYTH = $(LI <a href="$1" title="$2">$3</a>$4)

D = $(RED $(B D))

ARGS=$0
RPAREN = )
LPAREN = (
Expand Down Expand Up @@ -398,7 +396,8 @@ D_KEYWORD = <span class="d_keyword">$0</span>
D_PSYMBOL = <span class="d_psymbol">$0</span>
D_PARAM = <span class="d_param">$0</span>

CODE=<tt>$(NOTRANSLATE $0)</tt>
D = $(NOTRANSLATE <span class="d_inlinecode">$0</span>)
CODE=$(D $0)
CCODE=<pre class="ccode">$(NOTRANSLATE $0)</pre>
CPPCODE=<pre class="cppcode">$(NOTRANSLATE $0)</pre>
GRAMMAR=<pre class="bnf">$(NOTRANSLATE $0)</pre>
Expand All @@ -407,6 +406,8 @@ SCINI=<pre class="scini">$(NOTRANSLATE $0)</pre>
CONSOLE=<pre class="console">$(NOTRANSLATE $0)</pre>
MODDEFFILE=<pre class="moddeffile">$(NOTRANSLATE $0)</pre>

MDASH=<nobr>&#x200A;&mdash;&#x200A;</nobr>

NEWS=http://digitalmars.com/drn-bin/wwwnews?$1/$+
NEWS=http://digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=$1&artnum=$+
NEWS=http://digitalmars.com/webnews/newsgroups.php?search_txt=&group=$1&article_id=$+
Expand Down
13 changes: 9 additions & 4 deletions operatoroverloading.dd
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,15 @@ class C {
form:)
---
struct S {
int opEquals(ref const S s) { ... }
bool opEquals(ref const S s) { ... }
}
---

$(P For $(D struct)s, signatures such as $(D int opEquals(S s)) and
others are also accepted. This is because the operation is
essentially a syntactic rewrite$(MDASH)the only
requirement is that $(D a.opEquals(b)) compiles.)

<h2><a name="compare">Overloading &lt; &lt;=, &gt; and &gt;=</a></h2>

$(P Comparison operations are rewritten as follows:)
Expand Down Expand Up @@ -692,7 +697,7 @@ a.$(I opfunc)()

<h3>Examples</h3>

$(OL
$(OL
$(LI
-------
class A { int $(B opNeg)(); }
Expand Down Expand Up @@ -827,7 +832,7 @@ a $(I op) b
the following sequence of rules is applied, in order, to determine
which form is used:

$(OL
$(OL
$(LI The expression is rewritten as both:
---
a.$(I opfunc)(b)
Expand All @@ -854,7 +859,7 @@ b.$(I opfunc)(a)

<h4>Examples</h4>

$(OL
$(OL
$(LI

-------
Expand Down
1 change: 0 additions & 1 deletion std.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ GREATER = &gt;
WEB = $(LINK2 http://$1,$2)
LUCKY = $(WEB
google.com/search?btnI=I%27m+Feeling+Lucky&amp;ie=UTF-8&amp;oe=UTF-8&amp;q=$0,$0)
D = <font face=Courier><b>$0</b></font>
D = <span class="d_inlinecode">$0</span>
BIGOH = <b><i>&Omicron;</i>(</b>$(D $0)<b><i>)</i></b>
GLOSSARY = $(LINK2 ../glossary.html#$0, $0)
Expand Down

0 comments on commit 086d56d

Please sign in to comment.