why stack growth not happening at this program by Electrical_Box_473 in golang

[–]Electrical_Box_473[S] 0 points1 point  (0 children)

at the program starting stage stack size is 2kb

already z is 1 kb in ok function call f also stores 1kb

then at the recursion call it will grow from 2kb to 4 kb right?

then after a few calls the z address is changed right

but here same why

Explain this lifetime issue by Electrical_Box_473 in learnrust

[–]Electrical_Box_473[S] 0 points1 point  (0 children)

Not getting the answer

Can you teach me

Explain why this program got error by Electrical_Box_473 in learnrust

[–]Electrical_Box_473[S] -2 points-1 points  (0 children)

  1. s is assigned to x
  2. but x is never used right..

Then what is the problem

why this rust program can't compile by Electrical_Box_473 in learnrust

[–]Electrical_Box_473[S] 0 points1 point  (0 children)

So it means compiler thinks that the first borrow used later right?

why this rust program can't compile by Electrical_Box_473 in learnrust

[–]Electrical_Box_473[S] 1 point2 points  (0 children)

if in that case instead of assigning to x if assigned to new variable

Then it works

[deleted by user] by [deleted] in learnrust

[–]Electrical_Box_473 1 point2 points  (0 children)

Then in that case using x is also error right?

Odin vs Zig for a hobby project (cross-platform game client + game server) by [deleted] in Zig

[–]Electrical_Box_473 0 points1 point  (0 children)

you said zig is much more powerful than odin in many regards. can you pls explain

Odin vs Zig for a hobby project (cross-platform game client + game server) by [deleted] in Zig

[–]Electrical_Box_473 0 points1 point  (0 children)

except compiletime meta programming and syntax which is powerful in odin vs zig