Marking a delegate as pure, nothrow, etc.
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Sun Apr 13 11:30:57 PDT 2014
On 13/04/14 20:28, Joseph Rushton Wakeling wrote:
> On 13/04/14 20:10, Dicebot wrote:
>> I'd actually recommend to put all function attributes after parameter list even
>> for normal function declarations. It is not widely accepted practice but helps
>> avoid some confusion
>
> It's actually my habitual practice
Incidentally, for _exactly_ the reason you describe. Early in my D life I got
quite confused over the need to write,
const(int) foo() { ... }
and not
const int foo() { ... }
and putting function attributes after is _really_ helpful in avoiding unhelpful
and incorrect comparisons to C/C++ declarations.
More information about the Digitalmars-d-learn
mailing list