On Wed, 29 Dec 2010 11:02:23 -0500 "Steven Schveighoffer" <[email protected]> wrote:
> stdout is currently implemented via C's FILE * to allow interleaving of C > output and D output. However, FILE * has some limitations that may hinder > performance. If you don't care about interleaving C and D I/O, you could > replace stdout with a D-based output stream to achieve higher > performance. But this is only possible if stdout is *runtime* switchable, > which means both the C-based stdout and the D-based stdout have a common > base and implement polymorphism. > > I think the right call in I/O is to use interfaces/classes and not > compile-time interfaces. +++ (IIUC) What about logging? Or even output to several 'streams' in //. One can use an external lib's output functionality and redirect it simply by reassigning stdout. How are such features currently written using D? Denis -- -- -- -- -- -- -- vit esse estrany ☣ spir.wikidot.com
