streaming redux
Vladimir Panteleev
vladimir at thecybershadow.net
Tue Dec 28 19:29:19 PST 2010
On Tue, 28 Dec 2010 18:09:01 +0200, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Nonono. Perhaps I chose the wrong name, but Formatter is really anything
> that takes typed data and encodes it in raw bytes suitable for
> transporting. That includes e.g. json, csv, and also a variety of binary
> formats.
Ah, OK. For some reason I thought it was only for binary data. Still, I
can't shake off the idea that having an interface method for each native
type is not the perfect solution.
> Yah, but that precludes dynamic polymorphism...
Hmm. I seem to have somehow reached the conclusion that due to recent
developments D has breached the barrier when we can easily wrap dynamic
polymorphism around static polymorphism. Of course, that would require the
compiler to know beforehand all the types used with the various templated
methods when constructing the interface VMT, so it's back to another kind
of static polymorphism. (Perhaps in a JIT-ed language, there would be no
need for this distinction...) Well, ignore my crazed ramblings then :P
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d
mailing list