... when you see that the Nim compiler is smart enough to [differentiate 
between an array access and a generic call](https://play.nim-lang.org/#ix=2EbI) 
while the programmer has difficulties with the syntax...
    
    
    var bar: array[1 .. 1, proc (y: int): int]
    
    proc fuzz(x: int): int =
      x * x
    
    bar[1] = fuzz
    
    proc foo[x: static int](y: int): int =
      y
    
    echo "foo[1](2) = ", foo[1](2)
    echo "bar[1](2) = ", bar[1](2)
    
    
    Run

This prints 
    
    
    foo[1](2) = 2
    bar[1](2) = 4
    
    
    Run

Reply via email to