Why can’t extensions with protocol conformances have a specific access level?

It’s because it’s impossible to conform to a protocol at any access level other than the access level of the protocol itself. In other words, if you have a public protocol, you cannot have private conformance to it. This is partially because protocol conformance is something that can be queried for at runtime (and therefore … Read more

How to restrict access to nested class member to enclosing class?

Actually there is a complete and simple solution to this problem that doesn’t involve modifying the client code or creating an interface. This solution is actually faster than the interface-based solution for most cases, and easier to code. public class Journal { private static Func<object, JournalEntry> _newJournalEntry; public class JournalEntry { static JournalEntry() { _newJournalEntry … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)