To elaborate on Araq's answer, in Nim like in many other programming languages 
such as C++ or Java there is a fundamental difference between these two cases.

Your first example shows a regularily defined procedure while the latter does 
two things at once. It defines a variable and assigns to it a reference to an 
annonymous procedure.

Since the variable is only declared after evaluating the expression to be 
assign to it recursion is not possible.

And this is not the only issue or limitations, for example they cannot 
participate in procedure overloading (since you cannot have two variables with 
the same name in the same scope) or dot call syntax. It also gives the compiler 
less optimisation opportunities since you are dealing with function references 
now.

Reply via email to