Comment

Comment by akdas

To expand on this: the "unit" here represents the number of possible values that can be returned.

The confusion is probably because "empty" can mean two things:

- What's inside the returned value. That may be why the parent suggested empty for the unit type. But that's now what "unit" means in the common parlance.

- How many possible values can be returned. Never returning means the function has zero possible return values.

parent akdas 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton