News for hackers. Stuff that matters.
Re:“A closure is a poor man’s object; an object is a poor ma... by DougBTX on Monday May 01, 2017 @11:34AM (#14238359)
At least in C# terminology, a "setter" for a public property is mediated access, unmediated access would be a public field that can be set without invoking a setter method.

Getters and setters in C# are method calls, like `setFoo` in Java, so can't be assumed to be simple, they can do anything any other method can do.

Re:“A closure is a poor man’s object; an object is a poor ma... by noblethrasher on Wednesday May 03, 2017 @10:13AM (#14255796)
As it turns out, C# is a language that I know extremely well; I'm aware that setters can have arbitrary code. But, here's the problem: A programming a language is medium for thought, which means that it promotes or prevents the occurrence of certain ideas.

So, even though the compiler will accept any legal void-returning code within the inner braces of

    public Foo Bar
    {
        set
        {
          //Do stuff
        }
    }
The fact that the client code is going to look like `Obj.Foo = whatever` will practically foreclose on all but a small subset of possibilities.