- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
A lazy val is a val
Tue, 2009-02-10, 15:18
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? :-)
Tue, 2009-02-10, 15:57
#2
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
Tue, 2009-02-10, 16:57
#3
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
Tue, 2009-02-10, 17:07
#4
Re: A lazy val is a val
On Tue, Feb 10, 2009 at 3:55 PM, Andrew Gaydenko <a@gaydenko.com> wrote:
Anyone who thinks the user is always right should be made to work tech support for a while.
> 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.
Tue, 2009-02-10, 19:47
#5
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.maciver@gmail.com>
2009/2/10 David MacIver <david.maciver@gmail.com>
On Tue, Feb 10, 2009 at 3:55 PM, Andrew Gaydenko <a@gaydenko.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.
Wed, 2009-02-11, 09:47
#6
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
Wed, 2009-02-11, 09:57
#7
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.
Wed, 2009-02-11, 10:07
#8
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.clarkson@gmail.com> wrote:
--
__~O
-\ <, Christos KK Loverdos
(*)/ (*) http://ckkloverdos.com
On Wed, Feb 11, 2009 at 10:55 AM, Ricky Clarkson <ricky.clarkson@gmail.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
No. It's always been true. A lazy val is a val and is in most regards treated as such.