Closed timbray closed 1 year ago
By "absent" do you mean "no return value," like a void
function in C? If so, what would be the point? The usefulness of functions is that they perform calculations on inputs and provide a result.
Indeed, the clarification should be that not all types that make up the type hierarchy are useful as return types. (Which does not mean they need to be outlawed -- they are just not useful.)
By "absent" do you mean "no return value," like a
void
function in C? If so, what would be the point? The usefulness of functions is that they perform calculations on inputs and provide a result.
No. Absent
is a type with one instance (Nothing
).
I can just about conceive of a logging function that doesn't need to return a value returning type Absent
. It could be used in a filter expression like this ... && !log(...)
. I'm not suggesting that's a good idea, but it could be done.
That has no impact on the output of the query, though. Why would one include such a thing? Logging is an implementation/application concern.
No.
Absent
is a type with one instance (Nothing
).
What? I'm asking about the meaning of Absent
. How is it used? What's it's purpose? It doesn't appear in the spec anywhere, so why even ask the question?
2023-01-10 Interim: Remove Absent type.
I'm looking at 2.6.1 and wondering if it would be meaningful for a function to have a result type of
Absent
. How could such a function be used in a filter? If it is the case that this doesn't make sense, that should probably be noted in the text.