[phobos] Fwd: [Issue 4025] New: Making network with the std.stdio.File interface

Adam D. Ruppe destructionator at gmail.com
Thu Apr 8 13:14:46 PDT 2010


On Thu, Apr 08, 2010 at 03:55:43PM -0400, Adam D. Ruppe wrote:
> alias FileImpl!(FILE*) File;

Problem with this: outside functions can't just take a File and expect it to
work. It isn't a deal breaker, since these functions could be changed to simple
templates, but it doesn't seem ideal.

Files based on different implementations being different types seems like a good
idea, since fclose() won't work on a range (for example), so assigning them to
each other won't work.

I guess it either has to be an interface and classes, or used as templates,
to make this idea work.


More information about the phobos mailing list