> I can think of an example where the concept = container logic fails. Let's > assume that we have Set[T] concept, and one would like to implement it for > T=char by using a bitfield (that's 4 times 64-bit int, so it is an array[4, > int]). This could be Set[char], however, there is no char in this type's > syntax.
I don't understand this example at all. Besides, you can always introduce helper types to perform the matching as you please `type Swapper[T,S] = Cont[S, T]`. > proc RandomLinearCombination(x, y: VectorSpace[float]): auto = ... # here > VectorSpace[T] needs to know T Since a `VectorSpace[float]` is exactly the same as `float`, there still is no need to parametrize `VectorSpace`. > What do you think? Seems to be more complex than my solution, but it also seems to me that you described Zahary's solution (I skyped with him about it), so it could be fine. ;)
