dsimcha Wrote: > This is why I don't want to see @property fully implemented. Ever. I > love this method chaining stuff and you can pry it out of my cold, dead > hands. There was a discussion about this a long time ago when I was > writing the first version of Plot2kill that gave me the impression that > @property was to be used for disambiguation only. (See > http://www.digitalmars.com/d/archives/digitalmars/D/Overloading_property_vs._non-property_113421.html > > .) > > The problem with the with statement idea is that you still need to > declare the variable. I often throw up quick anonymous plots with > anonymous Figure objects, like: > > Histogram(someDataSet).toFigure > .title("A Title") > .xLabel("Stuff") > .showAsMain();
What do you think about C# object initializers? http://msdn.microsoft.com/en-us/library/bb384062.aspx