You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should consider using private if possible instead of fileprivate.
Personally, I don't like the idea of having two privates: private and fileprivate. But since we have them, we should follow Principle of least privilege. For example, we should use private for variables and methods if they get used within the same scope (same extension, same class or struct). If we can't, then use fileprivate when those variables and methods get used in different scope but within the same file.
How to do it?
Search all fileprivate and see which one can be downgraded to private.
The text was updated successfully, but these errors were encountered:
Following up @tbaranes 's comment on #437 (comment)
We should consider using
private
if possible instead offileprivate
.Personally, I don't like the idea of having two
private
s:private
andfileprivate
. But since we have them, we should follow Principle of least privilege. For example, we should useprivate
for variables and methods if they get used within the same scope (same extension, same class or struct). If we can't, then usefileprivate
when those variables and methods get used in different scope but within the same file.How to do it?
Search all
fileprivate
and see which one can be downgraded toprivate
.The text was updated successfully, but these errors were encountered: