On Monday, 18 June 2018 at 08:25:46 UTC, Russel Winder wrote:
On Sun, 2018-06-17 at 15:55 -0700, Walter Bright via
Digitalmars-d wrote:
[…]
Identifiers starting with __ are reserved for the
implementation:
https://dlang.org/spec/lex.html#identifiers
They have implementation-defined behavior. Do not use them in
user code.
In delegates I have found I have to use _ and __ (and ___,
____, etc.,but I have only had to use two to date) for delegate
parameters that are to be unused and unnamed. Are these treated
differently because they are all underscores?
Well you can use identifiers that uses __, but certain names that
uses __ as a prefix will have implementation defined behavior.
I guess for parameters that are strictly __ etc. they're just
behaving "normal" because there are no implementation behavior
for said identifiers and thus defaults to "normal behavior".
I also guess it's mostly an issue with function names, field
names etc. and not really paramters, but I could be wrong.