Alejandro Martinez

BlogPodcastPortfolio Youtube

06 August, 2014Development🕐 1min read

Why internal and no protected?

This is a question that I have in my mind since Apple introduced the access modifiers. Why we want internal and not protected?

The thing is that when I'm creating or designing software sometimes I found myself with the need to overwrite things in a subclass without exposing those properties or methods in the public interface.

In the other hand I don't think that I really need to give acces to another classes of my framework but not to the public interface, this seems weird for me.

I'm also in favour of having only public and private, but if I need another modifier I would like to see something like protected, not like internal.

👉🏻 If you have any feedback you can reach me at alexito4

inessential: How to Be Wrong on the InternetSwift alternatives to protected

Alejandro Martinez

Buka pintu