Tags » Type System

Back2Basics: Introduction to Scala Type System

As programmers, we often come across a concept called type inference. To begin with let me clarify that type inference is not something unique to Scala, there are many other languages like Haskell, Rust and C# etc that have this language feature. 1,017 more words

Scala

String's competing constructors

Let’s start with the problem. I want to check whether a program received a text message that consists of four consecutive zeroes. Not '0', but the numeric zero. 1,333 more words

Programming

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,182 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