-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename Nothing
type to avoid confusion with Kotlin's
#1335
Comments
To be mentioned as breaking change in Release Notes. |
Suggested alternative name: |
Previously suggested empty |
We currently have two See the |
@alexander-yevsyukov
"Something has happened, and we could potentially react on it. But at this time, we chose not to." Using Therefore, I'd stick to |
Yeah, see this commit. |
Resolved by #1554. |
Kotlin has standard type which is named
Nothing
. It is used in function declarations when it never returns because of throwing an exception.We have a specialized
Message
type,io.spine.server.model.Nothing
, which serves as a return type of handler methods that do not return anything. These methods do return an instance of such message and exit normally.This may bring various confusions for Kotlin people:
Nothing
, not the standard Kotlin's one.Nothing
in a Kotlin code for a handler would cause, but I'm not sure it would be OK.Nothing
when the user's code needs to use Kotlin's one.In order to avoid this confusion we need to have a type with another name.
The text was updated successfully, but these errors were encountered: