Conversation
Notices
-
Embed this notice
chjara (chjara@akko.wtf)'s status on Wednesday, 04-Dec-2024 22:40:56 JST chjara ALGOL 60 is one hell of a programming language what do you mean they were doing this call by name nonsense in 1960 - snacks repeated this.
-
Embed this notice
chjara (chjara@akko.wtf)'s status on Wednesday, 04-Dec-2024 22:40:56 JST chjara they still had fucking index-register-less vacuum tube computers and they go "hmm yes the best way to program this is with the most complex evaluation strategy known to man" Haelwenn /элвэн/ :triskell: and snacks like this. -
Embed this notice
chjara (chjara@akko.wtf)'s status on Wednesday, 04-Dec-2024 22:43:35 JST chjara @koakuma procedure arguments in ALGOL 60 (and derivatives) are by default passed as like a thunk that will return the value instead of being evaluated at call point, it’s evaluated whenever it needs the value
real procedure Sum(k, l, u, ak) value l, u; integer k, l, u; real ak; comment k and ak are passed by name; begin real s; s := 0; for k := l step 1 until u do s := s + ak; Sum := s end;
for instance this thingand you can do Sum(i, 1, 100, V[i]) (given a 100-element array V and an integer variable i) and it’ll ask for the value of V[i] after setting i to the loop variable on each iteration
snacks likes this. -
Embed this notice
Sun Microdevil Pte Ltd (koakuma@uwu.social)'s status on Wednesday, 04-Dec-2024 22:43:36 JST Sun Microdevil Pte Ltd @chjara What is a call by name?
snacks repeated this.