{"action":"created","issue":{"url":"https://api.github.com/repos/everard/contiguous-container/issues/9","repository_url":"https://api.github.com/repos/everard/contiguous-container","labels_url":"https://api.github.com/repos/everard/contiguous-container/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/everard/contiguous-container/issues/9/comments","events_url":"https://api.github.com/repos/everard/contiguous-container/issues/9/events","html_url":"https://github.com/everard/contiguous-container/issues/9","id":191031943,"number":9,"title":"Rationale for public inheritance of Storage from contiguous_container","user":{"login":"gnzlbg","id":904614,"avatar_url":"https://avatars.githubusercontent.com/u/904614?v=3","gravatar_id":"","url":"https://api.github.com/users/gnzlbg","html_url":"https://github.com/gnzlbg","followers_url":"https://api.github.com/users/gnzlbg/followers","following_url":"https://api.github.com/users/gnzlbg/following{/other_user}","gists_url":"https://api.github.com/users/gnzlbg/gists{/gist_id}","starred_url":"https://api.github.com/users/gnzlbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnzlbg/subscriptions","organizations_url":"https://api.github.com/users/gnzlbg/orgs","repos_url":"https://api.github.com/users/gnzlbg/repos","events_url":"https://api.github.com/users/gnzlbg/events{/privacy}","received_events_url":"https://api.github.com/users/gnzlbg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-22T15:06:57Z","updated_at":"2016-11-23T13:19:53Z","closed_at":null,"body":"I cannot find the rationale for `continuous_container` publicly inheriting from `Storage` in the paper, and I think such decision needs a good motivation, because otherwise `continuous_storage` re-exports everything that `Storage` has, but these are typically implementation details. \r\n\r\nFor example: a user can slice a `continuous_storage<Storage>&` with `Storage&`, call the \"unsafe\" `size()` member (`Storage::size() -> size_type&`), and mutate the size of the `continuous_storage` without actually constructing or destructing elements, breaking all the container invariants. \r\n\r\nI don't think this can _easily_ happen by accident, but it opens the question of why isn't this forbidden by using private inheritance?\r\n\r\nThe cost would be that `contiguous_storage` would need to re-specify those functions of `Storage` that actually should be re-exported (e.g. `data`/`begin`...), but that would actually make the interface of `contiguous_storage` crystal clear, since it wouldn't depend on what `Storage` does or does not export anymore."},"comment":{"url":"https://api.github.com/repos/everard/contiguous-container/issues/comments/262510570","html_url":"https://github.com/everard/contiguous-container/issues/9#issuecomment-262510570","issue_url":"https://api.github.com/repos/everard/contiguous-container/issues/9","id":262510570,"user":{"login":"gnzlbg","id":904614,"avatar_url":"https://avatars.githubusercontent.com/u/904614?v=3","gravatar_id":"","url":"https://api.github.com/users/gnzlbg","html_url":"https://github.com/gnzlbg","followers_url":"https://api.github.com/users/gnzlbg/followers","following_url":"https://api.github.com/users/gnzlbg/following{/other_user}","gists_url":"https://api.github.com/users/gnzlbg/gists{/gist_id}","starred_url":"https://api.github.com/users/gnzlbg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnzlbg/subscriptions","organizations_url":"https://api.github.com/users/gnzlbg/orgs","repos_url":"https://api.github.com/users/gnzlbg/repos","events_url":"https://api.github.com/users/gnzlbg/events{/privacy}","received_events_url":"https://api.github.com/users/gnzlbg/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T13:19:53Z","updated_at":"2016-11-23T13:19:53Z","body":"In that case `protected` instead of `private` would work, and still prevent the situations I described above."}}
{"actor":{"display_login":"gnzlbg"}}