Hacker News new | ask | show | jobs
by a8da6b0c91d 4665 days ago
I understand that, but it's clearly not used in the body. I was hoping it would be a legal and implemented optimization.

move calls strike me as ugly and kinda dangerous. What if you do wind up wanting to refer to s in the body later on? It'd be nice if the compiler just handled it.

1 comments

> What if you do wind up wanting to refer to s in the body later on?

Then copy s, don't move it.

The point is move makes things that look like values as annoying as pointers. You have to keep track.
I'll buy that.