<div class="gmail_quote">On 2 December 2010 22:12, Hendrik Boom <span dir="ltr"><<a href="mailto:hendrik@topoi.pooq.com">hendrik@topoi.pooq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> The semantics of concatenation are hugely different from the</div><div class="im">
> semantics of addition. Consider 3+4 vs. 4+3.<br>
> Now consider "three"+"four"<br>
> vs. "four"+"three". If you want to do concatenation, have an operator for<br>
> concatenation. (++, say, as a random example.) Do not overload addition<br>
> with an operation that isn't even vaguely analogous.<br></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
</div>The semantics of matrix multiplication are hugely different from those<br>
of integer multiplication. Consider A*B vs B*A.<br></blockquote><div><br></div><div>This is why, if memory serves, there's two different "multiplication" operations and operators for matrices?</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> > I'm surprised that is overloadable, but indeed it appears it is. I don't<br>
> > think I have *ever* seen anyone overload it, and I have seen a lot.<br></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> I would tell you how I used it, but I'm utterly ashamed of that portion of<br>
> my life. ;) (It was in a type-safe SQL query builder.)<br></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
</div>That sounds as if you were defining . to be a reasonable approximation<br>
to SQL's . That sounds like a reasonable thing to do -- except if any of<br>
its uses would have to be disambiguated with C++'s hopelessly<br>
complicated disambiguation rules.<br></blockquote><div><br></div><div>Yeah, that was a problem. It also required some utterly retarded constructs like function calls that had double-parentheses because the comma is used differently in argument lists than in expressions and so forth. The final product was marginally better to use than the traditional format string-style SQL statement builders, but only marginally so and at a huge expense in implementation comprehension (and thus testing and debugging).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> Operator overloading can multiply these by orders of magnitude and have the<br>
> added problem of being, in effect, "COME FROM" statements.<br></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
</div>Those were fun. Good thing no one took hem seriously.<br></blockquote><div><br></div><div>Sure they did. It's called "Aspect-Oriented Programming". ;)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">I use the subset of C++ that's more or less equivalent to C. It gives</div>
me slightly better type-checking, but that's the main benefit.<br></blockquote><div><br></div><div>I think this plus limited use of inheritance is the majority use of C++.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> What is the FFI lingua franca again? C or C++? (Hint: one of those two<br>
> languages has syntax to make it compatible with the other, but not vice<br>
> versa.)<br></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
</div>C has interfacing specs that are more or less consistent from machine to<br>
machine.<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
C++ doesn't seem to.<br></blockquote><div><br></div><div>C++ doesn't even have interfacing specs that are consistent and compatible from compiler to compiler. Or, often, compiler version to compiler version in the same family.</div>
<div> </div><div><div class="im"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> "Perhaps people don't believe this, but throughout all of the discussions of</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> entering China our focus has really been what's best for the Chinese people.</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> It's not been about our revenue or profit or whatnot."</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> --Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.</blockquote>
<blockquote><br></blockquote>
</div><blockquote>More demonstrating how difficult some ethical decisions, even with the</blockquote><blockquote>best of intentions.</blockquote>
<font color="#888888"></font></div><div><br></div><div>This presumes you actually believe what Brin says. I don't. I think revenue and profit was their only concern in moving into China and a lack thereof on both fronts was their motive to leave.</div>
</div><br>-- <br>"Perhaps people don't believe this, but throughout all of the discussions of entering China our focus has really been what's best for the Chinese people. It's not been about our revenue or profit or whatnot."<br>
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.<br>