A: Probably not listed because it's not an 'operator' in the typical sense, as it doesn't replace an existing operator syntax, like '+' or '*'. It is documented with the ForeachStatement.
Q: How can I implement arraylike a = b[foo .. bar]?
A: Just overload the [ .. ] operator with opSlice and have it return an array.
Q: From the page: "The member function opEquals() is defined as part of Object as: int opEquals(Object o);" Why would this return int rather than bool?
A: Supposedly for performance reasons.
Note: The applicability of any performance reasons to opEquals is disputed - see NG:digitalmars.D/44064
Q: The documentation needs to mention opAssign (or the lack of it) and why it does not exist...
A: Look again. D does now have an opAssign, and it is documented.
* http://d.puremagic.com/issues/show_bug.cgi?id=1861 * http://d.puremagic.com/issues/show_bug.cgi?id=1517Version 1:
1. opCmp version 2 -- is simply inaceptable form for opCmp
Left picture is values given by opCmp.v1 and right is values given by opCmp.v2. Sign shown by color: red-positive, blue-negative, aqua-zero line.
2. using ref parameters in opCmp is not an evil. But existing bug with sort only points to inpropper algorithm used, the same hiddend bug was in Borland Pascal 7.0 example of qsort.pas. And it was widely reproduced (for example: http://www.qslnet.de/member/dg1xpz/programm/tp/qsort.html or http://www.thur.de/~voland/pub/Pascal/qsort.pas). The problem apears only with indirect sorting (with reference on data). So sort algorithm should be changed to correct one in the next version.
Here is D source code to check the problem: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&message_id=67039&attachment_id=1&o=file.html
While D's comparison operators, with their implicit conversion to comparisons against 0 certainly seem easier to optimize and clearer than C++'s overloaded operators, there is one obscure advantage to C++'s implementation.
If your use of these operators isn't to compute a value immediately, but to build up a representation of the expression - ie return a parse tree of the expression rather than execute the expression - you can do that in C++. You can not do that in D, as far as I can tell.