Thread overview
[Issue 12479] New: replace "pointsTo" with "maybePointsTo" and "definitlyPointsTo"
Mar 27, 2014
Andrej Mitrovic
March 27, 2014
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


--- Comment #0 from monarchdodra@gmail.com 2014-03-27 01:51:39 PDT ---
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: -------
March 27, 2014
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


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2014-03-27 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: -------
March 27, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12479



--- Comment #2 from monarchdodra@gmail.com 2014-03-27 11:32:53 PDT ---
(In reply to comment #1)
> 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: -------