{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/16130","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/16130/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/16130/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/16130/events","html_url":"https://github.com/dart-lang/sdk/issues/16130","id":84564086,"number":16130,"title":"Make ByteBuffer an active object with a useful interface, not an opaque capability.","user":{"login":"lrhn","id":4865287,"avatar_url":"https://avatars3.githubusercontent.com/u/4865287?v=4","gravatar_id":"","url":"https://api.github.com/users/lrhn","html_url":"https://github.com/lrhn","followers_url":"https://api.github.com/users/lrhn/followers","following_url":"https://api.github.com/users/lrhn/following{/other_user}","gists_url":"https://api.github.com/users/lrhn/gists{/gist_id}","starred_url":"https://api.github.com/users/lrhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrhn/subscriptions","organizations_url":"https://api.github.com/users/lrhn/orgs","repos_url":"https://api.github.com/users/lrhn/repos","events_url":"https://api.github.com/users/lrhn/events{/privacy}","received_events_url":"https://api.github.com/users/lrhn/received_events","type":"User","site_admin":false},"labels":[{"id":219928184,"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-library","name":"area-library","color":"c7def8","default":false},{"id":219928305,"url":"https://api.github.com/repos/dart-lang/sdk/labels/library-typedData","name":"library-typedData","color":"d4c5f9","default":false},{"id":334529267,"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type:%20enhancement","name":"Type: enhancement","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2014-01-16T09:57:55Z","updated_at":"2017-08-11T13:17:32Z","closed_at":"2017-08-11T13:17:32Z","body":"Currently the ByteBuffer object has no useful methods, and the interface cannot be implemented by new classes because the system depends on an internal shared secret between ByteBuffer and the .view constructors.\n\nHow about instead having:\n&nbsp;&nbsp;class ByteBuffer {\n&nbsp;&nbsp;&nbsp;&nbsp;...\n&nbsp;&nbsp;&nbsp;&nbsp;Int8List asInt8List([int start = 0, int end]);\n&nbsp;&nbsp;&nbsp;&nbsp;Uint8List asUint8List([int start = 0, int end]);\n&nbsp;&nbsp;&nbsp;&nbsp;...\n&nbsp;&nbsp;&nbsp;&nbsp;Float64List asFloat64List([int start = 0, int end]);\n&nbsp;&nbsp;&nbsp;&nbsp;ByteData asByteData([int start = 0, int end]);\n&nbsp;&nbsp;}\n\nand make the view constructors go that way instead:\n&nbsp;&nbsp;factory Uint8List.view(ByteBuffer buffer, [int start = 0, int end]) =&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buffer.asUint8List(start, end);\n\nThat would mean that anyone can create a new ByteBuffer implementation (or mock), and that there doesn't need to be an assumption in the view constructors on the actual implementation of the buffer.\n(The view constructors are irrelevant now, but we can keep them for backwards compatibility).\n&nbsp;&nbsp;\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/321809513","html_url":"https://github.com/dart-lang/sdk/issues/16130#issuecomment-321809513","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/16130","id":321809513,"user":{"login":"lrhn","id":4865287,"avatar_url":"https://avatars3.githubusercontent.com/u/4865287?v=4","gravatar_id":"","url":"https://api.github.com/users/lrhn","html_url":"https://github.com/lrhn","followers_url":"https://api.github.com/users/lrhn/followers","following_url":"https://api.github.com/users/lrhn/following{/other_user}","gists_url":"https://api.github.com/users/lrhn/gists{/gist_id}","starred_url":"https://api.github.com/users/lrhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrhn/subscriptions","organizations_url":"https://api.github.com/users/lrhn/orgs","repos_url":"https://api.github.com/users/lrhn/repos","events_url":"https://api.github.com/users/lrhn/events{/privacy}","received_events_url":"https://api.github.com/users/lrhn/received_events","type":"User","site_admin":false},"created_at":"2017-08-11T13:17:32Z","updated_at":"2017-08-11T13:17:32Z","body":"That's done."}}
{"actor":{"display_login":"lrhn"}}