On 02/09/2018 05:49 PM, H. S. Teoh wrote:
On Fri, Feb 09, 2018 at 05:49:31PM -0500, Nick Sabalausky (Abscissa) via 
Digitalmars-d wrote:


Really? That's not been my perception.

 From what I've seen, anything that requires the user to mixin a
string, is pretty much automatically granted the black mark of death -
no one will touch it.

Well no, the mixin is not exposed to the user.

But I do see it used quite a lot inside libraries, specifically Phobos.
Well, "quite a lot" is not a fair statement; perhaps I should better say
"more often than it probably should be".  While a mixin-based hack
certainly gains brownie points for cleverness, in the long term it
incurs a maintainability cost, and sometimes a hefty one.  If the mixin
is of significant length, it can be a nightmare to debug / fix / extend.
(And I say that because, yes, to my shame I've also done that in my own
code.)


Ahh, I see. I wonder if the immediate "reach for string mixins" reaction is larely, perhaps subconciously, due to impedance of all the asymetric mess that dealing with types can otherwise be?

Reply via email to