Scala Variances: Covariance, Contravariance, and Invariance

1. Variance

Variance is the interconnection of subtyping relationship between complex types and their component types.

Variance is all about sub-typing. It tells us if a type constructor is a subtype of another type constructor. Variance defines inheritance relationships of parameterized types(types that have parameters within them).

C# Basics: Delegates

Delegates are one of the most used features of C#. They allow you to pass a function as a function pointer. It is kind of the same as a function pointer in C++.

Put simply, delegates are the same as a function pointer in C ++. They refer to another function.

Filterer Pattern in 10 Steps

Filterer is a pattern that should be applied only in special cases. In the original post, I presented a very simple example intended to show how to apply it. In this post, I present a much more detailed example that's intended to also explain when and why you should apply it.

Introduction

This post consists of 10 short, easy steps on how to correctly implement the filter pattern. In each step, I introduce the requirements of the following two types: