|
|
Subscribe / Log in / New account

Discarding return value, and ignoring return type

Discarding return value, and ignoring return type

Posted Sep 25, 2025 6:08 UTC (Thu) by epa (subscriber, #39769)
In reply to: Discarding return value, and ignoring return type by NYKevin
Parent article: Canceling asynchronous Rust

I think the problem is that let _ is the standard syntax for “go and do something but ignore its return value” but it ends up meaning “don’t even do that thing, just create the future but then throw it away”. In terms of language semantics this is completely correct, of course, but it’s probably not what the programmer intended. So another level of “yes, really” may indeed be useful.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds