I understand and agree with all of your points (why it is essential, the 
JudyArray example, everything), except the first sentence.

What should be the type of `m` in the following code? Should this be a compile 
error? 
    
    
    type Stack[T] = concept c
      c.push(T)
      c.pop(var T) is bool # or something like this (this is: var t:T; 
c.pop(t); )
    
    proc f[T](x: Stack[T]): T =
      x.pop(result)
    
    type
      MyObject = object
        ...
    
    proc push(x: MyObject, e: int) = ...
    proc push(x: MyObject, e: string) = ...
    proc pop(x: MyObject, e: var int): bool = ...
    proc pop(x: MyObject, e: var string): bool = ...
    
    var x: myObject
    let m = f(x)
    

Thanks for taking the time for this,
    Peter

Reply via email to