News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.