Re: chaining serializer calls
Stefan Haustein <[email protected]>
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Organization | Univ. Dortmund FB 4 LS 8 |
| Message-ID | <[email protected]> |
> when i was using XmlSerializer i have realized it would be very handy to
> be able to chain serialization calls by returning this XmlSerializer instance
> from all void serialization calls, ex:
>
> ser.startTag("", "foo");
> ser.text("test");
> ser.endTag("", "foo");
>
> would could be written as:
>
> ser.startTag("", "foo").text("test").endTag("", "foo");
>
> what do you think about it?
In my opinion, it does not buy too much, and the chain would be
broken where methods have "real" return values. So I think it
would create more confusion than really help.
Best,
Stefan
--
Stefan Haustein
Univ. Dortmund, FB 4, LS 8 tel: +49 231 755 2499
Baroper Str. 301 fax: +49 231 755 5105
D-44221 Dortmund (Germany) www-ai.cs.uni-dortmund.de