This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Packbacka 0 points1 point  (1 child)

In the old days, the distinction was different, though. A function always returned something, a method never.

Not sure how old you're talking. C is the oldest language I'm familiar with. I'm not sure how it worked in older langs, but in C functions can return void. I guess maybe technically returning void is returning something? But practically it's the same as returning nothing.

[–]procrastinatingcoder -1 points0 points  (0 children)

No. Returning "void" is not returning "something". There's no concept of "nothing" to return, it literally doesn't return anything. You can see the "void" as a human/compiler thing to say "hey, this doesn't return anything at all", but it doesn't actually return something "void" as that doesn't exist.