Skip to content

Consider changing "diff" to "diff" and "diffOrNull" #339

Closed
@koperagen

Description

@koperagen

Right now diff can return null, but i'd argue that in some situations it's not desirable and people will write something like
diff { } ?: defaultValue
But it's not that obvious that diff returns null at all and personally i find out about it only after my code explodes
So, i think diff should have value parameter default and return non-null, and then we introduce a special version diffOrNull
It can even be nicely deprecated, as we add a new parameter, so we don't silently break anything

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions