www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11108] New: `hasElaborateAssign` should check whether the type is assignable

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108

           Summary: `hasElaborateAssign` should check whether the type is
                    assignable
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: verylonglogin.reg gmail.com
        ReportedBy: verylonglogin.reg gmail.com



14:37:55 MSD ---
The usage of `hasElaborateAssign` on unassignable types (e.g. `const` ones)
which now results in returning `false` is almost definitely an error. So
`hasElaborateAssign` has to reject such types.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 23 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108




14:41:18 MSD ---
https://github.com/D-Programming-Language/phobos/pull/1598

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 23 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/76fcee3a6679b2348fad1e375c62b2c7c82d430e
Fix Issue 11108 - `hasElaborateAssign` should check whether the type is
assignable

Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=11108

https://github.com/D-Programming-Language/phobos/commit/561d266f485646ced9c0449a7a64fa16563dd3a6


Fix Issue 11108 - `hasElaborateAssign` should check whether the type is
assignable

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/396d629120a05ff65ba6d89997f99a8a00a9ef67
Revert "Fix Issue 11108 - `hasElaborateAssign` should check whether the type is
assignable"

This reverts commit e82724d740d223b52be2800eeec8d5ed4f673dfb.

https://github.com/D-Programming-Language/phobos/commit/2f65b41d41328004f21e1047d85c055446d3285b


Revert "Fix Issue 11108 - `hasElaborateAssign` should check whether the ...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108




Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/73fa0f036a366c381beb0e784a1b28eccfe99741




-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 09 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

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


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 09 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |monarchdodra gmail.com
         Resolution|FIXED                       |



I don't believe this is a good choice.

I think a trait can be used inside a runtime check, and as such, all traits
should always compile.

This is currently the case for every trait we have, be they in std.traits or
std.range.

The trait name is "hasElaborateAssign". It should really just answer yes/no.
Not yes, no, error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 12 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/8751ccfb0c70b5f4166eb7707af983ccab460ab2
Revert "Fix for issue 11108"

This reverts commit c930d8bd5e5246653a0300aac791b4c82b0466c5.

https://github.com/D-Programming-Language/phobos/commit/d327f339aaf8b8d6a7ad6e62626355a0e5e0fdd3


Revert "Fix for issue 11108"

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 12 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11108




16:44:14 MSD ---

 I don't believe this is a good choice.
 
 I think a trait can be used inside a runtime check, and as such, all traits
 should always compile.
 
 This is currently the case for every trait we have, be they in std.traits or
 std.range.
 
 The trait name is "hasElaborateAssign". It should really just answer yes/no.
 Not yes, no, error.
See https://github.com/D-Programming-Language/phobos/pull/1623#issuecomment-26196738 for reply:
 So, we are talking about this:

 if (isAssignable!SS && !hasElaborateAssign!SS)

 Even in the case it would be just rare and uncommon code it is silly to make
regular code error-prone (spending programmers time on debugging their
mistakes) to support some patterns almost nobody use. But we are talking here
about not just rare and uncommon, but almost definitely incorrect construction
indicating an error. And you really did the error here [see pull discussion]
which my pull shown.
-- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 12 2013