Pierre-Yves Saumont wrote:
But this is not the main reason not to use them (in the book, I mean!) The main reason is that laziness is used everywhere, so it is important to learn how to work with it. By the way, laziness has been used by Java from the start. What could we do without laziness? Can you imagine programming in a language in which both branches of an if...else structure would always be evaluated? Or a language in which you could not escape from a loop until all iterations have been executed? No very useful. Java also has the lazy boolean operators (&& and ||). In Java 8, Optional has lazy methods such as orElseGet() and orElseThrow(). If orElseThrow was not lazy, the exception would always be thrown even when the Optional holds a value!
Pierre-Yves Saumont wrote:In Java 8, lazy values are represented by the Supplier interface. In the book, laziness is used in many places. Too many to list them all!
Tim Holloway wrote:Scala got quite popular in my hometown a year or so back, but I don't recall any of the local companies actually recruiting for Scala talent.
You can add Neo4J to the systems that are written at least partially in Scala.
Joe Harry wrote:I have been reading about higher kinded types in Scala recently and have a simple question. What is the difference between the following?
My understanding is that both are the same! If so then why use an underscore?
Paul Chiusano wrote:
We usually refer to functional programming in contrast to imperative programming, not in contrast to OOP. People mean lots of different things by OO, but to the extent that it is well-defined, I think it relates more to how one organizes code, rather than whether side effects are used.
Ulf Dittmer wrote:If there is a bandwidth issue then any communication will have problems. WebSockets are meant to address server-to-client communication (which generally is not possible with HTTP), and improve on latency (by not having to open a new connection for each message).