Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don’t think it’s so complex. Without i := i, there’s only one i. With i := i, there’s one i per iteration.

Closure captures are always by reference.

Heap vs stack allocation don’t affect the language semantics.



Yup. The linked article is a little confused. It thinks that an optimization to pass by value is affecting the behavior. In reality it only passes by value when it is indistinguishable from passing by reference (and it thinks it would be cheaper).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: