On Wednesday, 14 December 2016 at 03:49:23 UTC, Jonathan M Davis wrote:
On Tuesday, 13 December 2016 at 22:40:47 UTC, 01010100b wrote:
So why not let all function attributes which are keywords also be allowed to be used with a "@" prefixed?

Also, would you even allow @ on stuff like static or const?

Actually, allowing @ will reduce some confusion here.

@const T memberFunc(); // This function takes const(this), returns int
const T memberFunc(); // This function returns const(int)

Whereas now the second one is actually taking const(this) and returning int, which is quite surprising to new users coming from C/C++.


- Jonathan M Davis


Reply via email to