PartialFunction (Partially defined functions) In Scala

PartialFunction (Partially defined functions) In Scala A partial function is a unary function which is only defined for certain domain (i.e. input) values. They can be introduced anonymously. They can also be defined using PartialFunction trait. In order to understand partial functions, first introduce a type Student. It has three properties, id, sType and name… Continue reading »

Currying in Scala

Currying in Scala In our .net blog [shujaat.net], we have discussed about currying in details. Just to quote from there: Currying is a transformation technique in functional programming space. It is used to convert a function with multiple parameters to a set of functions with single parameter each. It can be used to create refined… Continue reading »

Structural Sub Typing in Scala

Structural Sub Typing in Scala

Structural Sub Typing in Scala Structural typing is compile time checked duck-typing. It allows us to specify the characteristics of a required type instead of an actual concrete type. Let’s create a new SBT project ScalaTyping. In this post we are going to discuss how Scala supports structural sub-typing. Let’s create a simple Scala SBT… Continue reading »

Apache Thrift And its usage in C#

Apache Thrift And its usage in C#

Apache Thrift And its usage in C# Services are based on the idea of RPC (Remote Procedure Calls). Apache Thrift is just another framework allowing us to write services but it makes it easier to write them by enabling polyglot development. Apache Thrift enables writing cross language services development. Why do we need Apache Thrift… Continue reading »

Observables in Javascript

Observables in Javascript

Observables in Javascript Observable pattern allows us to execute code blocks when a change happens. There are different implementations to support observables in different programming languages. In ECMAScript 6, Object.Observe() was introduced for the same purpose. It allows us to write functions which get called when an object’s properties are changed. Let’s look at the… Continue reading »