<div class="gmail_quote">On 27 August 2012 17:51, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 8/27/12 7:03 AM, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
    If we can take agreements each other about them, it may be supported.<br>
<br></div>
+1 for Kenji :)<br>
</blockquote>
<br>
I think the matter here is that we're looking at adding very significant complexity to the language for a feature with at best minor, marginal benefits.<br></blockquote><div><br></div><div>... what?</div><div>We're not talking about <i>adding</i> anything, we're talking about a bug.</div>
<div>The scenario given in the bug report isn't even theoretically flawed, it should work fine under the existing design (hence the bug report), but it seems some design changes may a) make more sense, and also b) simplify implementation/fixing the bug.</div>
<div>That seems fine, but rather than fixing said implementation bug, the feature was just removed from the language, which was coincidentally a major breaking change.</div><div><br></div><div><div>Does the dmd implementation define the D language?</div>
</div><div><br></div><div><div>I'm sure there's lots of bugs in various features that could be solved by removing the feature completely.</div><div>I encounter problems using 'ref' and 'in' all the time...</div>
<br class="Apple-interchange-newline"></div><div>The feature was obviously intended, someone took the time to put it there in the first place, and people use it.</div><div>It's implementation is apparently not perfect, and needs to be clarified, maybe that requires a design tweak. That seems more what Kenji is talking about to me.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Default arguments add no power to the language, you can quote me on that.<br></blockquote>
<div><br></div><div>Did I mention that <u>every project</u> I've written in D is broken? Why have I used a feature so much if it offers nothing?</div><div>The fact the bug even exists implies that someone saw value in the feature in the first place...</div>
<div><br></div><div>I'm not sure how you define 'power', but default args certainly offer convenience. It also allows the default to be changed universally in one place.</div><div>I wouldn't want to find the location of all calls to the function, and then reason whether their manual placement of the default arg at each instance is as a conventional default (such that I should update it to the new default), or whether they explicitly intend that value in this particular case.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A wrong was fixed with a simplifying solution. That broke some code. Granted, the code could be made to work with a much more complicated (and complicating) solution. Is it worth it? At this point in D's development, do we want to go full-bore about something that complicates the language to very little benefit, particularly considering we already have so many balls in the air? I think it's reasonable to look into fixing the code and calling it a day.<br>
</blockquote><div><br></div><div>A 'wrong'? What a subjective opinion. Default args are useful, and I absolutely appreciated the uniformity D seemed to offer in this respect (ie, all kinds of function definition supported them).</div>
<div>How do you define 'fixing the code'? The 'fix' is a major breaking change. Usually people are extremely phobic of the possibility of breaking changes in even minor cases, yet this is relatively severe.</div>
<div><br></div><div>Far more important changes have been rejected on the grounds that they're breaking changes alone...</div><div><br></div><div>If a solid solution is too difficult to implement, or isn't worth the time right now, then just put the bug back. It was such a minor bug in a very contrived case, and better than the fix.</div>
<div><br></div><div><br><div class="gmail_quote">On 27 August 2012 17:53, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On 8/27/12 7:34 AM, Manu wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">Yes, I suggested this as a possibility above, but nobody commented. It</div><div class="im">seems like it might solve 2 problems with one stone ;)<br></div></blockquote><br>Whilst I agree a metadata facility is an interesting topic to look into, I think default arguments for functions is a poor motivating example.</blockquote>
<div><br></div><div>I agree. It was just an interesting parallel that I noticed.</div></div></div></div>