Exceptional coding style
Mehrdad
wfunction at hotmail.com
Wed Jan 16 11:06:46 PST 2013
On Wednesday, 16 January 2013 at 18:57:06 UTC, mist wrote:
>
> This is a single template operator in D so it kind of solves
> the problem. First is tricky, but is exactly the reason
> sometimes types from external libs are used only via
> alias/typedef. I'd prefer something like
> :%s/boost::unord/std::unord/g though :) But well, if you are
> working with C++, then templates and mixins will hardly solve
> most problems of course, because C++ templates sucks and mixins
> do not even exist there.
Yeah I'm working in C++, not D.
But even if I was using D, there's no way in heck that I would
use a _MIXIN_ for that:
mixin("I'm not sure how this is supposed too be
readable").unordered_map!(int) a;
makes no sense to me at all, when I could just as well have said
'boost'.
Also, the search/replace thing won't work so well for any
real-world example (the second one is a lot closer to what I had
in mind... you can't just replace "T" with "T, U" and expect it
to work).
So my point is: no, it's not a simple matter of abstracting
things away. Lined-up text really DOES make certain tasks easier
than they would be otherwise.
More information about the Digitalmars-d
mailing list