Björn wrote his first program in 1980. After completing his MSc in CS and Engineering in 1994, programming has been the primary source of income, mostly from writing embedded software for communications systems. He has been working for a while at Net Insight, where he wears many hats, including mentor, trouble shooter, network communications expert, software architect and programmer; the latter in increasingly modern C++.
Occasionally Björn has been seen tinkering with unorthodox software constructs, pondering "what can be done with this?" He lives in Stockholm
Why can pointers be subtracted but not added?
What do raw C pointers, STL iterators, std::chrono types, and 2D/3D geometric primitives have in common?
In this talk we will present some curiously coupled data types that frequently occur in your programs, together forming notions that you are already intuitively familiar with. We will shine a light on the mathematical notion of Affine Spaces, and how they guide stronger design. We will review the properties of affine spaces and show how they improve program semantics, stronger type safety and compile time enforcement of these semantics.
By showing motivational examples, we will introduce you to the mathematical notion of affine spaces. The main focus will then be on how affine space types and their well defined semantics shape expressive APIs.
We will give examples and guidelines for creating your own affine types. Although the examples in the talk will use C++, the general concepts are applicable to other strongly typed programming languages.