www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12479] New: replace "pointsTo" with "maybePointsTo" and "definitlyPointsTo"

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

           Summary: replace "pointsTo" with "maybePointsTo" and
                    "definitlyPointsTo"
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com



Related: http://d.puremagic.com/issues/show_bug.cgi?id=9975

There has been on-going issues with "pointsTo", in the sense that it does not
know how to deal with unions. As a matter of fact, "pointsTo" *can't* know how
to deal with unions. As mentioned, it is in a catch-22 position of producing
either false positive or false negatives.

I suggest the removal of "pointsTo" in favor of the duo:
- maybePointsTo     (can produce false positives)
- definitlyPointsTo (can produce false negatives)

Currently, "pointsTo" is the same as "maybePointsTo", so the change could be
done without changing existing semantics.

Having two functions, with explicit names, should help with writting code
correctly, without any wrong assumptions of what "pointsTo" actually promises.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 27 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12479


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



17:14:24 CET ---
You've already made a typo. Let me suggest simpler names:

- mayPointTo
- doesPointTo

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 27 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12479





 You've already made a typo. Let me suggest simpler names:
 
 - mayPointTo
 - doesPointTo
Works for me. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 27 2014