"If we look at mathematics, it has been greatly driven by overloading. Extensions of a notion of numbers from natural numbers to integers, to rational numbers, to Gaussian integers, to p-adic numbers, etc., are examples of overloading. One can easily guess things without knowing exact definitions. If I see an…

# Creational use cases

"When dealing with "creational" use cases, try to find another aggregate or factory you can move that responsibility to. Sometimes the factory is just a static method (good for "context"/"intent" capturing), sometimes it's an instance method of another aggregate (good place for "data" inheritance), sometimes it's an explicit factory…

# Yet Another Scheme Tutorial

The goal of this tutorial is to provide enough knowledge and ability on Scheme programming language to read SICP, which is one of the best text book on computer science. The book uses Scheme to explain subjects.…

# Polymorphic types

“The requirements of a polymorphic type, by definition, come from where you use the type, not from the type itself.” (S. Parent) "When I use inheritence, I build the use of my object into my object. On the contrary, what I want to do is separate the use of my…

# Effects and structure

"An effect is the structural information of a Functor, i.e., the part that is not parametric. The state value in State, failure in Maybe and Either, the number of elements in [], and – of course – arbitrary external side effects in IO." (C. A. McCann)…

# Mathematicians vs. Computer scientists

"There is a considerable difference between a mathematician’s view of the world and a computer scientist’s. To a mathematician all structures are static: they have always been and will always be; the only time dependence is that we just have not discovered them all yet. The computer scientist…