4 ms·
call by name is an abomination - essentially you can call func(a[b]) ... every time func's parameter is referenced inside a[b] is reevaluated - b can be a globa
by Taniwha 6y ago
call by name is an abomination - essentially you can call func(a[b]) ... every time func's parameter is referenced inside a[b] is reevaluated - b can be a global or a local in the function making the call, inside the function you can read the resulting value or even assign to it .... essentially you need to pass a small code fragment that returns the address of a[b] (except that you can also pass "1" and what happens when you assign to that).
That and Algol60 scoping were probably the main mistakes in Algol60 - people were still figuring that stuff out back then.