Isn't `each` too much of a good thing?

12345swordy alexanderheistermann at gmail.com
Fri Sep 18 14:55:39 UTC 2020


On Thursday, 17 September 2020 at 21:03:08 UTC, H. S. Teoh wrote:

> Yeah, implicit is bad.  I used to be a fan of implicit things, 
> because of the convenience... but more and more, with more 
> experience, I'm starting to be convinced that explicit is 
> always better -- for readability and maintainability. Too many 
> layers of implicit things, and the code becomes obscure, hard 
> to read, or easy to *wrongly* read, and consequently fragile.
>
>
> T

By implicit I am assuming your talking about c++ here correct? I 
consider that language to implement implicit conversions poorly. 
Functions should opt-in implicit conversions, not opt-out.

The main case for it is writing:

T t = a;

Instead of:

T t = (t)a

That the main benefit of implicit conversion that we should be 
focusing on.


More information about the Digitalmars-d mailing list