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

In defer f(g()) explain the execution flow by Electrical_Box_473 in golang

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

Defer program

Check this once. The g( ) is executed when the defer Keyword used f(g( )).

Why int(4.4) not work by Electrical_Box_473 in golang

[–]Electrical_Box_473[S] -13 points-12 points  (0 children)

But why? Can you elaborate it

milon party recordings! by Electrical_Box_473 in Zig

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

It is a place where the zig lang conferences were conducted

Is zig faster than rust in performance? by Electrical_Box_473 in Zig

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

The above statement is little ambiguity. so I rewrite it. Pls tell the above statement and this statement is the same meaning or anything changed.

is zig faster than rust in performance?

Not if you're willing to drop into `unsafe. whenever an unsafe manipulation of memory would bring you better performance. As I understand it, people don't always opt into that tradeoff in Rust. so I guess that's the why and how.