4 ms·
Ignoring a return value is a normal thing in many situations. I like verbose but "discard" is weird enough that it might complexify API design to offer two func
by speed_spread 4y ago
Ignoring a return value is a normal thing in many situations. I like verbose but "discard" is weird enough that it might complexify API design to offer two functions instead of a single one.
- girvo 4y agoYou don’t need two functions, you just mark one as {.discardable.} and the discard happens automatically. Unless I’m misunderstanding you.
- michaelsbradley 4y ago`discard` isn’t part of the type signature. The functions in the blog post have void return type because between `)` and `=` there is no `: [type]`.