-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Milestone
Description
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:
- Why do we have a handler method that never completes? Just by looking at the method signature, it's not possible to tell that it's Spine-specific
Nothing, not the standard Kotlin's one. - What doesn't this handler work? I don't know what declaring wrong
Nothingin a Kotlin code for a handler would cause, but I'm not sure it would be OK. - Fully-qualified Spine's
Nothingwhen the user's code needs to use Kotlin's one. - etc.
In order to avoid this confusion we need to have a type with another name.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done