Closed ktvtrifork closed 3 years ago
@ktvtrifork update docs and merge :)
1 Warning | |
---|---|
:warning: | Big PR |
Generated by :no_entry_sign: Danger
This is not the "Swift way" of doing things, eventhough it might be a nicer way to do things. We decided that we won't go down this path to keep the coding style more Apple-like.
Closing PR đŸ§¹
the hide and show helps code that contains
where the natural thinking is that you either hide or show a view, which is the inverse of the "isHidden" property; and leads sometimes to bugs regarding the mixing of showing (a positive action) vs setting the isHidden to false (a negative action) so to simplify it without and potential confusion you are to express the intention via a name , rather than an assignment.
The "isNotEmpty" for a colleciton is to make code such as
more readable and easier to understand, as more complex expressions can easily "hide" the exclamation mark, and or might become complex because of the inversion going on in such expressions, eg:
The "Not" part makes that very apparent and also potentially simplifies boolean expressions as well.