“Time is Money”, something that everyone’s heard at some point in their life. When it comes to internet, the difference of a few milliseconds can make or break many modern businesses. As an example, let’s take a look at the world of digital advertising and the effect it has on the implementation of Real Time Bidding (RTB). To summarize a RTB transaction at a very high level – ad buyers are given a particular web request in “real-time” and must decide if they will bid on that request and how much they will pay. This decision typically must happen in less than 100 milliseconds or the ad offer will be lost. Within those 100 milliseconds dozens of analytics and decisions need to happen in order to make a profitable ad purchase. For instance, the age, gender, geography, affinity, and other factors of the ad consumer may be considered – all within 100 milliseconds.
What does all this obsession have to do with you, the “end user” read more …
Not unlike Scala, C# (but probably to a lesser extent) blends principles from both Java and Racket; giving you more than enough rope to hang yourself with, but at least providing some nice conveniences like closures, type inference and our topic for today: extension methods.
From Microsoft’s extension method documentation:
“Extension methods enable you to “add” methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. Extension methods are a special kind of static method, but they are called as if they were instance methods on the extended type. For client code written in C# and Visual Basic, there is no apparent difference between calling an extension method and the methods that are actually defined in a type.”