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`.

Reply via email to