std.socket classes
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Apr 9 21:32:20 PDT 2017
On Sunday, 9 April 2017 at 14:47:39 UTC, Jonathan Marler wrote:
> Does anyone know why Socket and Address in phobos were created
> as classes instead of structs?
It is probably just the historical evolution, but I find it
pretty handy: I did a subclass of Socket to do SSL, then as is
nice with classes, I can pass that to other code using the Socket
interface and have it work.
So I'd be sad if they changed it now too much, the class is
legitimately useful here and actually not very expensive`.
More information about the Digitalmars-d-learn
mailing list