|
|
|
|
|
by nyanmatt
830 days ago
|
|
I use maybe functions a lot for things like "maybeShowReminderDialog". The conditions for displaying the reminder are wrapped in this maybe function. Surely that's simpler than specifying those conditions before every call to show this dialog, resulting in plenty of duplicated code. And if those conditions change, there is only one place I need to update it. Of course I can make a single operation to check those conditions like "shouldShowReminder", but that too is doubling the surface area of this code. I see the merit of the argument here but disagree with the absolutist stance against "maybe" functions. |
|