Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Java is Pass-by-Value, Dammit. Parent comment
The example given would be, in Python,
def double(x): x *= 2 a = [4] double(a[0])
[1] http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html
There are no comments on this comment yet.
The example given would be, in Python,
If Python was pass-by-name, a would now be [8], but it's actually still [4].[1] http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html