On 21-10-17 12:33, Russel Winder wrote:

Is there any way of not specifying parameters in D for closures being used for callbacks when the parameters are not used. Rust does this very well by using _ and requiring the compiler to do all the needed type inference.

You could take advantage of D's type inference and use _ as a variable name:

quitAction.addOnActivate((_, __){ a.quit(); });

Only D doesn't allow you to use the same name for two parameters.