[Issue 12479] New: replace "pointsTo" with "maybePointsTo" and "definitlyPointsTo"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 27 01:52:09 PDT 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 at puremagic.com
        ReportedBy: monarchdodra at gmail.com


--- Comment #0 from monarchdodra at 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: -------


More information about the Digitalmars-d-bugs mailing list