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

H. S. Teoh hsteoh at
Thu Sep 17 21:03:08 UTC 2020

On Thu, Sep 17, 2020 at 02:23:43PM -0600, Jonathan M Davis via Digitalmars-d wrote:
> On Thursday, September 17, 2020 2:07:35 PM MDT H. S. Teoh via Digitalmars-d 
> wrote:
> > That bug has been filed for years, I wish somebody would take it up
> > and push it in. :-/  That has been a bad idea for years and yet it
> > still persists.
> >
> >
> I've brought it up to Walter before. As I understand it, his opinion
> is that scope solves the problem.

No, it doesn't solve the problem.  It fixes the *symptom*, but the
underlying problem persists.

> And while I agree that it helps, I still think that it would be better
> to just disallow the implict conversion entirely and require that it
> be explicit. That being said, I don't expect that we'll ever see such
> a change in D2, much as I think that it would be worth it.

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.


Just because you survived after you did it, doesn't mean it wasn't stupid!

More information about the Digitalmars-d mailing list