3 ms·
I think because a closure is not a function as a closure can capture its environment, in a way that functions can't, so using the same syntax for closures and f
by akkad33 2y ago
I think because a closure is not a function as a closure can capture its environment, in a way that functions can't, so using the same syntax for closures and functions can be misleading (even though languages like JS do it)
- IshKebab 2y agoI dunno, I could say that functions do capture their environment (global variables are captured by reference). I don't really see how it would be misleading.