Remix.run Logo
hgomersall a day ago

No, it should move properly when passing by value (as in, essentially the rust move semantics). If you want a copy, that should be explicit.

hyghjiyhu a day ago | parent [-]

Moving by default would be too much of a footgun without a borrow checker imo.

hgomersall 16 hours ago | parent | next [-]

I think using a language without a borrow checker is already a massive footgun (albeit less of one for GC/RC languages). More sensible move semantics would still be a big ergonomic improvement.

kccqzy 11 hours ago | parent | prev [-]

I think the language allowing use-after-move is honestly a smaller footgun than allowing using uninitialized memory or use-after-free. C++ already has the latter.