On Sunday, 17 June 2018 at 17:48:21 UTC, FromAnotherPlanet wrote:
On Sunday, 17 June 2018 at 16:52:59 UTC, Neia Neutuladh wrote:
The only case where D loses out is compared to { get; private
set; }.
That's a pretty big thing to give up. That allows for pretty
valuable control over visibility of encapsulated properties.
He means that in D this is split like that, which isn't as clean
as C# does
class MyClass
{
private int _myProp; // backing field
private @property void myProp(int a) { _myProp = a; } //
private setter
public @property int myProp() { return _myProp; } // getter
}