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

Re: Rationale for vars in Definitions?

2 replies
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Oh, but one moment, I'm not forcing them.  That's definitely the cause of some of this, let's see...
odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Rationale for vars in Definitions?

On Wed, Jan 25, 2012 at 5:16 PM, Paul Phillips wrote:
>
>
> On Wed, Jan 25, 2012 at 8:12 AM, Paul Phillips wrote:
>>
>> Oh, but one moment, I'm not forcing them.  That's definitely the cause of
>> some of this, let's see...
>
>
> In hindsight it makes no sense that we wouldn't be able to make them lazy
> vals, they're serially assigned in init! If there were a cycle we'd already
> see it with an NPE because the other var wouldn't be populated any more than
> the other lazy val.
>
> I should do more thinking and less doing.  I'll think about doing that
> anyway.
>

You'll get a pull request from me shortly which contains the change
(among a zillion others, but it will be in its separate commit).

Cheers

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: Rationale for vars in Definitions?


On Wed, Jan 25, 2012 at 8:12 AM, Paul Phillips <paulp [at] improving [dot] org> wrote:
Oh, but one moment, I'm not forcing them.  That's definitely the cause of some of this, let's see...

In hindsight it makes no sense that we wouldn't be able to make them lazy vals, they're serially assigned in init! If there were a cycle we'd already see it with an NPE because the other var wouldn't be populated any more than the other lazy val.
I should do more thinking and less doing.  I'll think about doing that anyway.

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