On Thu, Apr 21, 2011 at 4:12 PM, Michel Fortin <[email protected]>wrote:

> > How about the fact that it breaks using the same function for both method
> chaining and with property syntax?
>
>
> Just use "with":
>
>        with (new Album) {
>                name = "hello";
>                author = "me";
>                group = "them";
>                save("/musicinfo/hello.album");
>        }
>
> Much cleaner than forcing setters to return the underlying object.
>
> NOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!

This is about the 16 billionth time someone has suggested "with" as a
solution, and every time I am forced to point out yet again that with()
doesn't cut it.

auto hist = Histogram(someArray, 100)
    .barColor(getColor(255, 0, 0))   // Returns a Histogram
    .toFigure  // Returns a Figure
    .title("A histogram");

Try doing that anywhere near as succinctly with a with statement.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to