Overloading property vs. non-property

BCS none at anon.com
Thu Jul 15 16:46:59 PDT 2010


Hello dsimcha,

> Histogram(someData, 10)
> .barColor(getColor(255, 0, 0))
> .histType(HistType.Probability)
> .toFigure.title("A Histogram")
> .xLabel("Stuff").showAsMain();

With a little meta programming you might be able to make a type that generate 
a fluent interface for any type. Using opDispatch you pass the args into 
a contained type and return self. The only difference from the users standpoint 
is that you need one more function call in the chain.

-- 
... <IXOYE><





More information about the Digitalmars-d mailing list