<div class="gmail_quote">On 27 August 2012 13:54, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com" target="_blank">jmdavisProg@gmx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Monday, August 27, 2012 11:38:52 Manu wrote:<br>
> On 27 August 2012 11:12, Jonathan M Davis <<a href="mailto:jmdavisProg@gmx.com">jmdavisProg@gmx.com</a>> wrote:<br>
> > and it makes no sense to use them with function pointers or function<br>
> > literals.<br>
><br>
> If that were true, we wouldn't be having this discussion.<br>
<br>
</div></div>You can't possibly really be using these functions with default arguments<br>
unless you're not really using them like function pointers, otherwise you<br>
wouldn't have been using the default arguments in the first place.</blockquote><div><br></div><div>How do I use a function pointer 'like a function pointer' by your reasoning?</div><div>Is dynamic linkage not a valid use of function pointers?</div>
<div>It's possibly the <u>most</u> common use. Shared code is not exactly uncommon, just that it's often automated with compiler sugar these days.</div><div>Manually binding dynamic code has become rare, but it's still valid.</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 just do not make sense with function pointers, because they<br>
don't follow the function pointer, because it's a _pointer_ and has no<br>
knowledge of what it's pointing to. It's only at the declaration point of the<br>
function that the default argument exists, and that has _nothing_ to do with<br>
the function pointer.</blockquote><div><br></div><div>Clearly, since it's a function pointer, I don't own the function its self, or I'd just call that directly.</div><div>However, as you say, at the declaration point of the function pointer, I can likewise inform the compiler of the default args.</div>
<div>If the default args were worked into the variable declaration, that might work just as well as if it were in the type.</div><div><br></div><div>I don't really care so much HOW it works, only that it does. I think 99% of my cases would be addressed by the def args living in the variable declaration.</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">You might as well ask a reference of type Object what<br>
the arguments used to construct the derived class that it actually refers to<br>
were as expect a function pointer to have any clue about default arguments to<br>
the function that it points to.<br></blockquote><div><br></div><div>I agree, in principle, but I've still lost a thoroughly useful feature. Move it perhaps (to the declaration?), but don't <i>re-</i>move it (cough).</div>
</div>