This page is no longer maintained — Please continue to the home page at www.scala-lang.org

bug in "qualifies"

2 replies
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.

I don't know if this bug is responsible for anything interesting, but
since I'm against slinging flags around like this if we can ever see our
way clear to change it, I will use it to illustrate one of the reasons
it so disturbs me:

def qualifies(sym: Symbol): Boolean = {
reallyExists(sym) &&
((mode & PATTERNmode | FUNmode) != (PATTERNmode | FUNmode) || !sym.isSourceMethod)
}

As for me, even if somebody told me there was a bug in there it'd take
me a while to find it. I am morally certain we can raise the level of
transparency without impacting performance (and by morally certain I
mean I'm going to claim it without evidence, for now.)

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: bug in "qualifies"


On Tue, May 18, 2010 at 10:10 PM, Paul Phillips <paulp@improving.org> wrote:
I don't know if this bug is responsible for anything interesting, but
since I'm against slinging flags around like this if we can ever see our
way clear to change it, I will use it to illustrate one of the reasons
it so disturbs me:

 def qualifies(sym: Symbol): Boolean = {
   reallyExists(sym) &&
   ((mode & PATTERNmode | FUNmode) != (PATTERNmode | FUNmode) || !sym.isSourceMethod)
 }

As for me, even if somebody told me there was a bug in there it'd take
me a while to find it.  I am morally certain we can raise the level of
transparency without impacting performance (and by morally certain I
mean I'm going to claim it without evidence, for now.)

A bug it is, but I doubt it's very hard to find. It's all a matter of what kind of patterns you tune your mind to. That said, I'm quite open to put in something more legible.

Cheers

 -- Martin



Paul Phillips      | The most dangerous man to any government is the man who
Apatheist          | is able to think things out [...] Almost inevitably he
Empiricist         | comes to the conclusion that the government he lives under
ha! spill, pupil   | is dishonest, insane, intolerable.   -- H. L. Mencken


extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: bug in "qualifies"

On Tue, May 18, 2010 at 11:27:35PM +0200, martin odersky wrote:
> A bug it is, but I doubt it's very hard to find. It's all a matter of
> what kind of patterns you tune your mind to. That said, I'm quite open
> to put in something more legible.

Hey, if we could all tune our minds the way you can we'd be driving our
robot cars around on the moon by now.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland