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…

Category of C++ Types

In the first installment of "Category theory for programmers", Bartosz Milewski introduces a particular category in which objects and morphisms are thought as C++ values and C++ functions, respectively. Instead, let us try to delineate the category in which objects are C++ types. In such a category, morphisms are metafunctions…