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

That's more pass-by-reference, right? Which can be used to set things in the calling context, to be sure, but seems meaningfully different from "run this code N frames up", partly because it is limited in what it can do and partly because it can only change variables that you are actually mentioning in what you pass in.

(... unless I miss something.)



No, it's pass-by-name, which can feel like pass-by-reference. And yes, it's only that.


I usually associate "call-by-name" with laziness. Isn't this more pass-by-reference that may happen to be implemented using names under the hood? Alternatively, how would you distinguish them?




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

Search: