Bug 12046 – Rebindable supports arrays

Status
REOPENED
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-31T06:37:01Z
Last change time
2024-12-01T16:20:00Z
Assigned to
No Owner
Creator
monarchdodra
Moved to GitHub: phobos#10029 →

Comments

Comment #0 by monarchdodra — 2014-01-31T06:37:01Z
Which makes no sense (IMO) for types other than classes and interfaces. But for types such as dynamic arrays, where you can strip head-qualifiers, there's no point in having Rebindable work with it. It *might* make sense with associative arrays though... Not sure.
Comment #1 by monarchdodra — 2014-01-31T06:38:40Z
To add to that, the documentation clearly states: However, Rebindable!(T) does not compile if T is a non-class type. The fact it ever worked at all with dynamic arrays may have been an error.
Comment #2 by dlang-bugzilla — 2014-02-03T14:07:15Z
Why was the component set to "tools"?
Comment #3 by monarchdodra — 2014-02-03T22:43:48Z
(In reply to comment #2) > Why was the component set to "tools"? I accidentally the wrong in the drop down menu. Sorry :/
Comment #4 by peter.alexander.au — 2014-02-15T11:53:05Z
Comment #5 by github-bugzilla — 2014-02-15T14:01:15Z
Comment #6 by monarchdodra — 2014-02-15T14:55:36Z
1943 fixed the *static* array issue (which was a bug, plain and simple). It still supports dynamic arrays, which I think it shouldn't.
Comment #7 by peter.alexander.au — 2014-02-15T15:34:38Z
Sorry for closing, should have read the bug more carefully. However, I'm not sure what you expect to happen here. Rebindable has supported arrays for several years now. We can't just remove it. Removing it would making Rebindable a little more simple, and allows us to remove a few lines of code, but are there any other benefits? Is it worth potentially breaking someone's code, or introducing a slow deprecation process?
Comment #8 by monarchdodra — 2014-02-15T23:28:28Z
(In reply to comment #7)> > However, I'm not sure what you expect to happen here. Rebindable has supported > arrays for several years now. We can't just remove it. > > Removing it would making Rebindable a little more simple, and allows us to > remove a few lines of code, but are there any other benefits? Is it worth > potentially breaking someone's code, or introducing a slow deprecation process? I don't know what I expect to happen, nor what the best solution is, but there *is* something odd here, and that's why I filed the issue. As I said, it goes against what documentation says. I also find it *very* inconsistent that arrays are accepted, but not pointers nor AA's. Especially pointers, which are the closest things to classes. *I*'d introduce a "slow" deprecation process.
Comment #9 by robert.schadek — 2024-12-01T16:20:00Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10029 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB