3 ms·
> "but WHY is it like this?" Because, historically, it's been like that all over, it's not just Go. For example, Python has the same loop variable reuse. Prob
by yencabulator 3y ago
> "but WHY is it like this?"
Because, historically, it's been like that all over, it's not just Go. For example, Python has the same loop variable reuse.
Probably comes from a time when compilers were a lot simpler, and all local variables were allocated stack space for the whole duration of the function call.