Hacker News new | ask | show | jobs
by Zickzack 1375 days ago
> Something that doesn't return a value shouldn't be called a "function", that's just a C-ism.

Something that does not seem to return a value returns in fact a value of the type void which is empty. The idea comes from Algol 68 and has been a contribution by a certain John McCarthy.

1 comments

Ahh I finally get why C calls the unit / top type “void”—it’s empty as in requires no storage! (It’s not the usual empty / bottom / contradiction type, which has an empty set of possible values and would imply the function does not return at all.)