Hypothetical C++: easy type creation

Hypothetical C++: easy type creation

The reason programmers go for these simple types is easy to explain: they’re built-in, they have a lot of support functions, and their behavior is well known. Taking our and example, here are two function declarations that could not be written side-by-side if they were a :

While anyone could come up with a naming scheme to allow this to work with , the fact that you need to come up with such a scheme and, more importantly, that you need to worry about such an issue in the first place, points to the problem of not having a unique type for each. It should be easy to clone an existing function for the new type.

Source: www.spiria.com