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

A lazy val is a val

8 replies
anli
Joined: 2008-08-19,
User offline. Last seen 1 day 32 min ago.

The subject is cite from here:

http://lampsvn.epfl.ch/trac/scala/ticket/1706#comment:3

Is the language going to change in such dramatic manner? :-)

DRMacIver
Joined: 2008-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: A lazy val is a val
On Tue, Feb 10, 2009 at 2:17 PM, Andrew Gaydenko <a [at] gaydenko [dot] com> wrote:
The subject is cite from here:

http://lampsvn.epfl.ch/trac/scala/ticket/1706#comment:3

Is the language going to change in such dramatic manner? :-)

No. It's always been true. A lazy val is a val and is in most regards treated as such.
milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: A lazy val is a val

On Tue, Feb 10, 2009 at 2:17 PM, Andrew Gaydenko wrote:
> The subject is cite from here:
>
>
http://lampsvn.epfl.ch/trac/scala/ticket/1706#comment:3
>
> Is the language going to change in such dramatic manner? :-)

Oh for goodness sake ... what language change are you on about?

Look at SLS 4.1 Value Declaration and Definitions: you'll see that
lazy vals are introduced there and not in some separate section of
their own.

Yes, it would be a valuable enhancement for the Eclipse plugin to give
the option of highlighting lazy vals differently from strict vals,
but that is quite clearly an enhancement as opposed to #4d4d4d which was
equally clearly a bug.

If you really care so much about this ... please just send me a patch.

Cheers,

Miles

anli
Joined: 2008-08-19,
User offline. Last seen 1 day 32 min ago.
Re: A lazy val is a val

On Tuesday 10 February 2009 17:38:37 Miles Sabin wrote:
> On Tue, Feb 10, 2009 at 2:17 PM, Andrew Gaydenko wrote:
> > The subject is cite from here:
> >
> >
http://lampsvn.epfl.ch/trac/scala/ticket/1706#comment:3
> >
> > Is the language going to change in such dramatic manner? :-)
>
> Oh for goodness sake ... what language change are you on about?
>
> Look at SLS 4.1 Value Declaration and Definitions: you'll see that
> lazy vals are introduced there and not in some separate section of
> their own.
>
> Yes, it would be a valuable enhancement for the Eclipse plugin to give
> the option of highlighting lazy vals differently from strict vals,
> but that is quite clearly an enhancement as opposed to #4d4d4d which was
> equally clearly a bug.
>
> If you really care so much about this ... please just send me a patch.
>
> Cheers,
>
>
> Miles

I have naively thought, in the current context ("what does this class member
mean?" Eclipse plugin user's question) 'is' means 'is the same', rather formal
definition. A 'val' and a 'lazy val' are both vals, Ok. 'scalac' and a
computer virus are both 'software'. At both cases we are intersted in to not
confuse what is what.

And I agree, at case woud highlighting be absent at all (or be very embrionic
- say for keywords only) the issue can be called 'enhancement'. But at the
current "rich highlighting" plugin state it is just a defect.

> Oh for goodness sake ...

A user is right always, did you forget it? ;-)

Andrew

DRMacIver
Joined: 2008-09-02,
User offline. Last seen 42 years 45 weeks ago.
Re: A lazy val is a val
On Tue, Feb 10, 2009 at 3:55 PM, Andrew Gaydenko <a [at] gaydenko [dot] com> wrote:
> Oh for goodness sake ...

A user is right always, did you forget it? ;-)

Anyone who thinks the user is always right should be made to work tech support for a while.
Jan Lohre
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: A lazy val is a val
I fully agree with Miles and David, having different highlighting rules for vals and lazy vals is nice to have and definitely not a bug. Furthermore I would rank it quite low on a priority list, hence if you want it you should consider providing a patch.

2009/2/10 David MacIver <david [dot] maciver [at] gmail [dot] com>
On Tue, Feb 10, 2009 at 3:55 PM, Andrew Gaydenko <a [at] gaydenko [dot] com> wrote:
> Oh for goodness sake ...

A user is right always, did you forget it? ;-)

Anyone who thinks the user is always right should be made to work tech support for a while.

Detering Dirk
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
RE: A lazy val is a val

> But at the
> current "rich highlighting" plugin state it is just a defect.

I should definitely give this plugin a try.
If such things rank as bugs, all else must work marvellously.

> 'scalac' and a computer virus are both 'software'.
> At both cases we are intersted in to not confuse what is what.

Depends on the abstraction level. If I only want to distinguish
software from non-software, that isn't quite true.

And when doing an approximation process, the first steps aren't
"wrong", but only "currently not detailed enough".
Every further step is improvement, not error correction.
So -> distinguishing vals from lazy vals is an "enhancement".

> A user is right always, did you forget it? ;-)

Indeed he is ... but often enough only from said user's perspective.

From the developer perspective, a requirement like this
would need a critical mass to rise in priority in concurrence
to others ( filled in by other users which are always right).
I think that requirement hasn't.

KR
Det

Ricky Clarkson
Joined: 2008-12-19,
User offline. Last seen 3 years 2 weeks ago.
Re: A lazy val is a val

> I should definitely give this plugin a try.
> If such things rank as bugs, all else must work marvellously.

Haha.

Hahaha ha ha ha ahaaa haa.

Er, sorry.

loverdos
Joined: 2008-11-18,
User offline. Last seen 2 years 27 weeks ago.
Re: A lazy val is a val
We are funny guys after all ... :)

On Wed, Feb 11, 2009 at 10:55 AM, Ricky Clarkson <ricky [dot] clarkson [at] gmail [dot] com> wrote:
> I should definitely give this plugin a try.
> If such things rank as bugs, all else must work marvellously.

Haha.

Hahaha ha ha ha ahaaa haa.

Er, sorry.



--
 __~O
-\ <,       Christos KK Loverdos
(*)/ (*)      http://ckkloverdos.com

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