{"action":"opened","issue":{"url":"https://api.github.com/repos/open-swift/docs/issues/8","repository_url":"https://api.github.com/repos/open-swift/docs","labels_url":"https://api.github.com/repos/open-swift/docs/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/open-swift/docs/issues/8/comments","events_url":"https://api.github.com/repos/open-swift/docs/issues/8/events","html_url":"https://github.com/open-swift/docs/issues/8","id":155786778,"number":8,"title":"Compatibility Issues","user":{"login":"paulofaria","id":5126193,"avatar_url":"https://avatars.githubusercontent.com/u/5126193?v=3","gravatar_id":"","url":"https://api.github.com/users/paulofaria","html_url":"https://github.com/paulofaria","followers_url":"https://api.github.com/users/paulofaria/followers","following_url":"https://api.github.com/users/paulofaria/following{/other_user}","gists_url":"https://api.github.com/users/paulofaria/gists{/gist_id}","starred_url":"https://api.github.com/users/paulofaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulofaria/subscriptions","organizations_url":"https://api.github.com/users/paulofaria/orgs","repos_url":"https://api.github.com/users/paulofaria/repos","events_url":"https://api.github.com/users/paulofaria/events{/privacy}","received_events_url":"https://api.github.com/users/paulofaria/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-19T17:02:09Z","updated_at":"2016-05-19T17:02:09Z","closed_at":null,"body":"Open Swift's goal is to solve cross-project compatibility. But we have some issues in the way we currently handle things. Specifically:\r\n\r\n```swift\r\n// Open Swift\r\nstruct Request { ... }\r\n\r\n// Framework A\r\nextension Request {\r\n  var cookie: Cookie { ... }\r\n}\r\n\r\n// Framework B\r\nextension Request {\r\n  var cookie: Cookie { ... }\r\n}\r\n\r\n// Application\r\nimport FrameworkA\r\nimport FrameworkB\r\n\r\nlet cookie = request.cookie // trouble\r\n```\r\n\r\nWe should discuss a solution for this. Some that come to mind:\r\n\r\n- Add a prefix to any computed property defined in an extension so we don't have name clashes.\r\n\r\nExample:\r\n\r\n```swift\r\nextension Request {\r\n  var fwkCookie: Cookie { ... }\r\n}\r\n```\r\n\r\n- Create a proposal for Swift to allow disambiguation.\r\n\r\nExample:\r\n\r\n```swift\r\nimport FrameworkA\r\nimport FrameworkB\r\n\r\nlet cookie: FrameworkA.Cookie = request.cookie\r\n```\r\n\r\n- Make Open Swift a self-contained solution that doesn't need extensions (in general). In other words, change from protocol standards to a standard library.\r\n\r\nPlease leave any other suggestions in the comments and I'll update the issue description. Or update it directly if you're part of the organization.\r\n"}}