On Saturday, 20 February 2016 at 17:22:49 UTC, Mike Parker wrote:
On Saturday, 20 February 2016 at 17:20:16 UTC, Mike Parker
wrote:
getValue();
It's not unusual to discard the return value when calling a
function. Though a getter isn't a good example of this, of
course.
Oops. I somehow had it in my head that your example function
was getValue(), rather than thing(). Anyway, my point was that
the return value is not always used when calling a function
with side effects.
There's also the nice case:
void foo(string s) {
...
}
void foo(int i) {
...
}
string bar() {
...
}
int bar() {
...
}
void main() {
foo(bar); // Which one is it supposed to be?
}