Option

map(), flatMap() on Futures & Options in scala

Reading Time: 5 minutes In this blog, we would be looking at how map() and flatMap() operations work with Option and Future of scala, literally speaking both Futures and Options are very effective features of scala, A Future lets us have a value from some task on a differnt thread and Option provides us a hand from null of java as using null in scala is seen a very bad approach in Continue Reading

Functors in Scala

Reading Time: 2 minutes While programming in Scala we  often come across a term called Functor. A functor is an extremely simple but powerful concept. In this blog, let us discuss that in more detail. Theoretically functor is a type of mapping between categories. Given two categories A and B, a functor F maps the objects or entities of A to objects or entities of B. We can simply call Continue Reading

And You Thought Option is Just Another Way to Handle null

Reading Time: 4 minutes Ok, to start with, the recommendation is to use None instead of null. Ideally if in Scala code, we end up getting a NPE then that is sin! Well at least at Knoldus 🙂 null in Java is used as a placeholder for denoting no value or a non-fatal error situation. It is widely accepted as a Billion dollar mistake of Java. The way to Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!