re: Explain Empty Returns Like I'm Five VIEW POST


In addition to the abstract view of this situation, it's probably worth noting that different languages have different technical behaviors when it comes to returning nothing.

For example, Python will have the function call expression evaluate to "None", which is more-or-less its null value.

JS has it evaluate to "undefined".

Java code won't compile if it's possible for a function with a defined return type (!= void) to return nothing.

code of conduct - report abuse