Bug 12479 – replace "pointsTo" with "maybePointsTo" and "definitlyPointsTo"

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-27T01:51:00Z
Last change time
2014-05-23T18:44:31Z
Assigned to
nobody
Creator
monarchdodra

Comments

Comment #0 by monarchdodra — 2014-03-27T01:51:39Z
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.
Comment #1 by andrej.mitrovich — 2014-03-27T09:14:24Z
You've already made a typo. Let me suggest simpler names: - mayPointTo - doesPointTo
Comment #2 by monarchdodra — 2014-03-27T11:32:53Z
(In reply to comment #1) > You've already made a typo. Let me suggest simpler names: > > - mayPointTo > - doesPointTo Works for me.
Comment #3 by github-bugzilla — 2014-05-23T18:44:30Z
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/0ae323dc6f0eff18490cb6d58fc288870b154892 Merge pull request #2167 from monarchdodra/pointsTo Fix issues 9975 & 12479