- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: Rationale for vars in Definitions?
Wed, 2012-01-25, 17:12
Oh, but one moment, I'm not forcing them. That's definitely the cause of some of this, let's see...
Wed, 2012-01-25, 17:41
#2
Re: Rationale for vars in Definitions?
On Wed, Jan 25, 2012 at 8:12 AM, Paul Phillips <paulp@improving.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.
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