gasilhype.blogg.se

Scala interview questions
Scala interview questions











scala interview questions

If you use futures inside a for comprehension, they are executed sequentially, what can you do so they are executed in parallel? Of course, this must be done with caution. In your test, or in exceptional cases in your production code, you can block the execution until the future value is calculated using Await. If you have a Future holding some future value, you can access it and use it or transform it using map or flatmap, this will return another Future holding some future value related to the first one. When it is not suitable to use a case class? It an instance can perform statuful computation or complex behaviour a case class should not be used.

scala interview questions

They are used to define algebraic data types, normaly extending a sealed trait.Having the apply and unapply methods implemented for you, you can use pattern matching over your class, one of the most powerful techniques in functional programming.It has a concise syntax to define a class with some inmutable public attributes and it provides implementations for pretty print, apply and unapply among other super powers. I like to say that a case class is a class with super powers for holding inmutable data. What do you know about property based testing frameworks, such as Scalacheck?.What testing framework for Scala do you use?.What’s a cool project that you’ve recently worked on?.A list of helpful Scala related questions you can use to interview potential candidates.













Scala interview questions