Thread overview
[Issue 12046] New: Rebindable supports arrays
Feb 03, 2014
Vladimir Panteleev
Feb 15, 2014
Peter Alexander
Feb 15, 2014
Peter Alexander
Feb 15, 2014
Peter Alexander
January 31, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046

           Summary: Rebindable supports arrays
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tools
        AssignedTo: nobody@puremagic.com
        ReportedBy: monarchdodra@gmail.com


--- Comment #0 from monarchdodra@gmail.com 2014-01-31 06:37:01 PST ---
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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 31, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046



--- Comment #1 from monarchdodra@gmail.com 2014-01-31 06:38:40 PST ---
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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 03, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046


Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com
          Component|tools                       |Phobos


--- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> 2014-02-04 00:07:15 EET ---
Why was the component set to "tools"?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 04, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046



--- Comment #3 from monarchdodra@gmail.com 2014-02-03 22:43:48 PST ---
(In reply to comment #2)
> Why was the component set to "tools"?

I accidentally the wrong in the drop down menu. Sorry :/

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 15, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046


Peter Alexander <peter.alexander.au@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au@gmail.co
                   |                            |m


--- Comment #4 from Peter Alexander <peter.alexander.au@gmail.com> 2014-02-15 11:53:05 PST ---
https://github.com/D-Programming-Language/phobos/pull/1943

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 15, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046



--- Comment #5 from github-bugzilla@puremagic.com 2014-02-15 14:01:15 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/f8aa638c5a78401006784b2b9f7ad456bca1b3dc Fix Issue 12046 - Disallow Rebindable!(T[N])

https://d.puremagic.com/issues/show_bug.cgi?id=12046

https://github.com/D-Programming-Language/phobos/commit/ae4678e2bb6baa61d5529d447ce4b5eca37ad7b4 Merge pull request #1943 from Poita/bug12046

Fix Issue 12046 - Disallow Rebindable!(T[N])

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 15, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046


Peter Alexander <peter.alexander.au@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 15, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046


monarchdodra@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


--- Comment #6 from monarchdodra@gmail.com 2014-02-15 14:55:36 PST ---
1943 fixed the *static* array issue (which was a bug, plain and simple).

It still supports dynamic arrays, which I think it shouldn't.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 15, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046



--- Comment #7 from Peter Alexander <peter.alexander.au@gmail.com> 2014-02-15 15:34:38 PST ---
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?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 16, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12046



--- Comment #8 from monarchdodra@gmail.com 2014-02-15 23:28:28 PST ---
(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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------