[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #15 from github-bugzi...@puremagic.com --- Commit pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/448ddbe2e88d66feb0df3f679bc282840ac4bb26 std.socket: Add test for issue 16514 --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #14 from github-bugzi...@puremagic.com --- Commit pushed to scope at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/448ddbe2e88d66feb0df3f679bc282840ac4bb26 std.socket: Add test for issue 16514 --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #13 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/448ddbe2e88d66feb0df3f679bc282840ac4bb26 std.socket: Add test for issue 16514 --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 Vladimir Panteleevchanged: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #12 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/448ddbe2e88d66feb0df3f679bc282840ac4bb26 std.socket: Add test for issue 16514 --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #11 from Vladimir Panteleev--- (In reply to Vladimir Panteleev from comment #10) > With const/non-const overrides Overloads. I meant overloads. --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #10 from Vladimir Panteleev--- (In reply to Ketmar Dark from comment #8) > why not `inout` then? Well, that still doesn't fix that that PR broke code. With const/non-const overrides I thought that we could just make the const ones public (maybe final) and non-const protected for overriding, but that didn't work. --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #9 from Vladimir Panteleev--- Oops, meant to paste link to PR. https://github.com/dlang/phobos/pull/4858 (In reply to Vladimir Panteleev from comment #1) > I wonder if we could provide protected non-const and public const overloads. No because then you get "class Y use of X.fun() is hidden by Y; use 'alias fun = X.fun;' to introduce base class overload set" errors. --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #8 from Ketmar Dark--- why not `inout` then? --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #7 from Vladimir Panteleev--- https://issues.dlang.org/show_bug.cgi?id=16514 --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #6 from Vladimir Panteleev--- Well, even if it doesn't make sense for non-pure methods, there's still some getter methods that should actually be const. --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #5 from Ketmar Dark--- i'd say that for AA it is way better (at least in this case) to subclass the thing with new opHash implementation. also, `const` Socket has very little sense: despite being `const`, it is still changing some of it's internal state. slapping `const` usually means "it should not change while i holding it", but this is not the case for open Socket (OS doesn't know about that restriction ;-). i.e. i see no sense in trying to *pretend* that const Socket has any meaning: it is confusing and mostly useless. --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #4 from Vladimir Panteleev--- Introduced in https://github.com/dlang/phobos/pull/4273 --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #3 from Vladimir Panteleev--- It's sometimes useful, such as when it's a field in a const object. Or when you want to use a class as an AA key, to associate some data with it but don't have control over the class's creation. --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 --- Comment #2 from Ketmar Dark--- is there any sense in having const methods there at all? anything more complex than "syscall with fd" will require non-const anyway. besides, Socket is heap object, and class with VMT, so it isn't supposed to be lightning-fast anyway. const/nothrow simply adds some "attribute noise" here, without any real purpose. i think. ;-) --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 Vladimir Panteleevchanged: What|Removed |Added CC||thecybersha...@gmail.com --- Comment #1 from Vladimir Panteleev --- My fault. I wonder if we could provide protected non-const and public const overloads. --
[Issue 16514] std.socket methods are const, and thus cannot be overriden for SSLSocket, for example
https://issues.dlang.org/show_bug.cgi?id=16514 Ketmar Darkchanged: What|Removed |Added CC||ket...@ketmar.no-ip.org --