www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12046] New: Rebindable supports arrays

reply d-bugmail puremagic.com writes:
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



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: -------
Jan 31 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12046




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: -------
Jan 31 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
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



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: -------
Feb 03 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12046





 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: -------
Feb 03 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
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



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: -------
Feb 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12046




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


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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
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: -------
Feb 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12046


monarchdodra gmail.com changed:

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



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: -------
Feb 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12046




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: -------
Feb 15 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12046





 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: -------
Feb 15 2014