Faux Amis:

I think there is nothing wrong with a module scope private var as in D a module is the first encapsulation and adding a wrapper only adds noise.

Generally it's better to minimize the scope of variables. So if you wrap a variable inside a struct you have often reduced its scope, unless the module contains only one variable and only one struct :-)

Often it's better to pass variables as arguments.

Again, in D "pure" is your good friend.

Bye,
bearophile

Reply via email to