- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: JVM Optimizations and val.
Tue, 2011-12-27, 17:06
Also, please note that overriding vals means that there's one field generated per override.
On Tue, Dec 27, 2011 at 5:04 PM, Pavel Pavlov <pavel.e.pavlov@gmail.com> wrote:
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
On Tue, Dec 27, 2011 at 5:04 PM, Pavel Pavlov <pavel.e.pavlov@gmail.com> wrote:
вторник, 27 декабря 2011 г. 22:54:47 UTC+7 пользователь Pavel Pavlov написал:вторник, 27 декабря 2011 г. 22:42:04 UTC+7 пользователь edmondo1984 написал:Dear Pavel,thank you for your answer. You are getting to the point.
Having a final val makes also the accessor final, right?
No. It would be impossible to override val in that case - see Viktor's example.
Sorry, I've mislooked your question. Yes, in that case accessor will be final.
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang