Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




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.)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: