Tags » Type System

A friendly type predicate

This is a sequel to the previous post on writing a custom type predicate. One of the readers on Reddit made a very insightful observation. The user has implemented a type that she intends to use with our library, call it… 2,368 more words

Programming

Your own type predicate

In this post we will see how to define a type trait or a type predicate or a meta-function that would allow us to check at compile time whether a type exposes an interface that we need. 5,191 more words

Programming

29LT Azer : Serious & Amicable

29LT Azer type family consist of 14 styles, 7 Standard styles and 7 Slanted styles, covering the following weights: Thin, Extra Light, Light, Regular, Medium, Bold, and Black. 1,040 more words

Pascal Zoghbi

Compile-time string concatenation

We will start with a bug, taken from real life. It spans across three files:

#include <string>

struct Service
{
  static const std::string NAME;
};
… 3,774 more words
Programming

Profunctor Parametricity

The Free Theorem for Ends

In Haskell, the end of a profunctor p is defined as a product of all diagonal elements:

forall c. p c c… 1,390 more words
Programming