Isn't `each` too much of a good thing?
H. S. Teoh
hsteoh at quickfur.ath.cx
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
> > 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.
> > https://issues.dlang.org/show_bug.cgi?id=15932
> 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
Just because you survived after you did it, doesn't mean it wasn't stupid!
More information about the Digitalmars-d