The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dvonk (3) [Avatar] Offline
Why not use: lazy val a = b (instead of lazy val b = "hello")
This also seems to work, and with a.length it is the first time something is done.
Daniela Sfregola (12) [Avatar] Offline
Hi dvonk,
this will be fixed in the next MEAP release.

Mark Elston (133) [Avatar] Offline
I have a bit of trouble with this example. I was unaware that you could even refer to some entity before it is declared. I don't believe this is possible in Java. Is it really possible in Scala?