@zahary It becomes more and more obvious that I won't have time to work on Nim 
nowadays. It is my regular job which put more load on me.

Coming back to `Concept[T]`, I can see 3 possible ways to continue.

**1.**: allow inference only if its unique. So `c.push(T)` only works if there 
is one `push` function, or we already know what `T` type is (e.g., we know that 
it is `string`).

**2.**: allow inference to metatypes. So `c.push(T)` can lead to `T` being 
`string|int`. I recommend an extra check at the end. That is if you have a 
match (e.g., `T` is `int` and `S` is `int`), then reevaluate the concept's body 
again just to be sure. (Just for the record, the reason for this extra check is 
an example above somewhere in this thread.)

**3.**: allow some extremely smart logic which infers everything which is 
possible. This needs to involve some backtrack logic.

I would vote to `1.`, but that doesn't work with your `Stack[T]` case. I'm 
strongly against with `3.`, because it can lead to extreme compilation time. 
`2.` looks nice.
    Peter

Reply via email to