<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 16 March 2014 21:28, Rainer Schuetze <span dir="ltr"><<a href="mailto:r.sagitario@gmx.de" target="_blank">r.sagitario@gmx.de</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"><br>
<br>
On 14.03.2014 23:25, deadalnix wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday, 14 March 2014 at 22:06:13 UTC, Daniel Kozák wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
First I think have something like<br>
<br>
@disable(final,nothrow) would be the best way, but than I think about it<br>
and realize that final(false) is much more better.<br>
<br>
</blockquote>
<br>
If I may, final!false . We have a syntax for compile time<br>
parameter. Let's be consistent for once.<br>
<br>
The concept is solid and is the way to go. DIP anyone ?<br>
</blockquote>
<br></div></div>
To me, it's not a decision "final or virtual", but "final, virtual or override", so a boolean doesn't work. final!false could infer "virtual or override", but then it would loose the explicitness of introducing or overriding virtual.<br>

<br>
I'm in favor of adding the keyword "virtual", it is known by many from other languages with the identical meaning. Using anything else feels like having to invent something different because of being opposed to it at the start.<br>

<br>
Adding compile time evaluation of function attributes is still worth considering, but I'd like a more generic approach, perhaps something along a mixin functionality:<br>
<br>
enum WINAPI = "export extern(Windows)";<br>
<br>
@functionAttributes!WINAPI HANDLE GetCurrentProcess();<br>
<br>
though I would prefer avoiding string mixins, maybe by providing a function type as prototype:<br>
<br>
alias export extern(Windows) void function() fnWINAPI;<br>
<br>
@functionAttributesOf!fnWINAPI HANDLE GetCurrentProcess();<br>
</blockquote></div><br></div><div class="gmail_extra">I frequently find myself needing something like this. What's wrong with aliasing attributes directly?</div><div class="gmail_extra">DGC/LDC offer their own internal attributes, but you can't make use of them and remain portable without an ability to do something like the #define hack in C.</div>
</div>