[Haskell-cafe] pointer equality

Brandon Allbery allbery.b at gmail.com
Wed Jul 20 19:32:59 CEST 2011


On Wed, Jul 20, 2011 at 13:22, Chris Smith <cdsmith at gmail.com> wrote:

> On Tue, 2011-07-19 at 23:33 -0700, Carl Howells wrote:
> > False positives and false negatives are both possible, depending on GC
> > timing.  Don't use it, unless you know why it can result in both false
> > positives and false negatives, and you know why neither of those are
> > bad for your use case.
>
> Can you clarify what you mean by false positives?  Do you just mean it
> may return true but then later behave as if there's no sharing?  Or do
> you mean it may return true and then later the two expressions may be
> observably different?  If the latter, then it seems this would be a
>

I think it's more correct to say that the compiler is free to do things that
would lead to false positives if it knows that it's safe to do so (and
purity means it can find more of those cases, and more of them *will* be
safe) — but there is no way for it to crowbar pointer equality tests in that
case.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110720/b5e869f4/attachment.htm>


More information about the Haskell-Cafe mailing list