On Monday, October 10, 2016 01:43:54 Konstantin Kutsevalov via Digitalmars-d- learn wrote: > Why 'socketstream' was > deprecated when no any replacement modules? It looks strange, > like you are removing feature from your app because his code old > and don't write new code for same feature, and just say to users: > no feature anymore, haha. > > So anyone know the answer?
Quite some time ago, it was decided that the *stream modules as they were were unacceptable and that they needed to be replaced with something range-based (they come from early D1 and have never really been updated since), and they were marked in their documentation to indicate that they were going to be removed in the future. But apparently, no one cared enough about that functionality to actually design a replacement, and it sat there for years. So, it was finally decided that rather than just having code that was not up to our current standards sit there with a warning on it, it should be removed. So, they those modules were deprecated (and will be fully removed in the next release). I'm sure that part of what it comes down to is that ranges in generally largely slove the problem that a stream tries to solve (though std.socket unfortunately doesn't provide an easy way to get a range over a socket), making the *stream modules largely redundant, and the read, write, and peek functions in std.bitmanip do a lot of the rest of what would need to be done with a stream that isn't natively part of a range. So, enough of the functionality is there in a more general form that a replacement isn't necessarily needed (even if it might be nice), and if anyone cared enough to do it, they haven't tried to get it into Phobos (or even put it up on code.dlang.org AFAIK). Clearly, some folks use the *stream stuff, but it doesn't seem like many do, and it's also clear that - for whatever reason - no one has cared enough to come up with a replacement for Phobos. So, it's simply gone. But if someone wants to propose a replacement, they're certainly still free to do so. - Jonathan M Davis