Comment on Ask HN: Do you follow the positive or negative pattern when programming?Comments−prudentpomelo3yI prefer early returns. It avoids nesting when checking preconditions. However, the function must always return the same type.
Comments
I prefer early returns. It avoids nesting when checking preconditions. However, the function must always return the same type.