Adding Java and C++ to the MQTT benchmarks or: How I Learned to Stop Worrying and Love the Garbage Collector

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 8 16:49:55 PST 2014


On Wed, Jan 08, 2014 at 11:59:58PM +0000, digitalmars-d-bounces at puremagic.com wrote:
> On Wednesday, 8 January 2014 at 23:43:43 UTC, NoUseForAName wrote:
[...]
> >(I am not part of that majority, though). I mean C gave us
> >classics like "atoi".. still reminds me of "ahoi" every time I
> >read it. And I will never get over C++'s "cout" and "cin". See?

The absolute worst offender from the C days was creat(). I mean,
seriously?? I'm actually a fan of abbreviated names myself, but that one
simply takes it to a whole 'nother level of wrong.


> I don't mind cout, I hardly use cin, I try to avoid cerr, and I've
> never used clog… I mind how you configure iostreams though. It looks
> worse than printf, not sure how they managed that.
[...]

I hate iostream with a passion. The syntax is only the tip of the
proverbial iceberg. Manipulators that change the global state of the
output stream, pathologically verbose ways of controlling output format
(cout << setprecision(5) << num; -- really?!) that *also* modifies
global state, crazy choice of output operator with counter-intuitive
operator precedence (cout << a&b doesn't do what you think it does), ...
I have trouble finding what's there to like about iostream.

Even when I was still writing C++ a few years ago, I avoided iostream
like the plague. For all of its flaws, C's stdio is still far better
than iostream in terms of everyday usability. At least for me. YMMV.


T

-- 
Marketing: the art of convincing people to pay for what they didn't need before which you can't deliver after.


More information about the Digitalmars-d mailing list