{"action":"created","issue":{"url":"https://api.github.com/repos/dlang/druntime/issues/2093","repository_url":"https://api.github.com/repos/dlang/druntime","labels_url":"https://api.github.com/repos/dlang/druntime/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/dlang/druntime/issues/2093/comments","events_url":"https://api.github.com/repos/dlang/druntime/issues/2093/events","html_url":"https://github.com/dlang/druntime/pull/2093","id":297249046,"number":2093,"title":"[WIP] core.array.staticArray static array litteral: `staticArray(1, 2, 3)`","user":{"login":"timotheecour","id":2194784,"avatar_url":"https://avatars2.githubusercontent.com/u/2194784?v=4","gravatar_id":"","url":"https://api.github.com/users/timotheecour","html_url":"https://github.com/timotheecour","followers_url":"https://api.github.com/users/timotheecour/followers","following_url":"https://api.github.com/users/timotheecour/following{/other_user}","gists_url":"https://api.github.com/users/timotheecour/gists{/gist_id}","starred_url":"https://api.github.com/users/timotheecour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timotheecour/subscriptions","organizations_url":"https://api.github.com/users/timotheecour/orgs","repos_url":"https://api.github.com/users/timotheecour/repos","events_url":"https://api.github.com/users/timotheecour/events{/privacy}","received_events_url":"https://api.github.com/users/timotheecour/received_events","type":"User","site_admin":false},"labels":[{"id":660234731,"url":"https://api.github.com/repos/dlang/druntime/labels/WIP","name":"WIP","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-02-14T21:20:06Z","updated_at":"2018-02-15T05:15:39Z","closed_at":"2018-02-15T05:15:39Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/dlang/druntime/pulls/2093","html_url":"https://github.com/dlang/druntime/pull/2093","diff_url":"https://github.com/dlang/druntime/pull/2093.diff","patch_url":"https://github.com/dlang/druntime/pull/2093.patch"},"body":"## usage\r\n```\r\nauto a = staticArray(1, 2, 3);\r\nfloat[2] = staticArray!float(1, 2);\r\n```\r\n\r\n## motivation\r\nplaces like here: https://github.com/dlang/dub/pull/1377#discussion_r168262426\r\n\r\n## notes\r\n* NOTE: in core.runtime so it can be used in more settings including dmd compiler which can't use phobos\r\n\r\n* NOTE: other (stalled) PR's have proposed something like `staticArray(T)(T[] a)` ; I suggest this could be done instead (in another PR) via (something like) `toStaticArray(T)(T[]a)` to avoid name ambiguity\r\n\r\n## links\r\nhttps://issues.dlang.org/show_bug.cgi?id=8008 Issue 8008 - Syntax for fixed size array literals like [1,2,3]s (edit)\r\nhttps://issues.dlang.org/show_bug.cgi?id=481 Issue 481 - Fixed-length arrays with automatically computed length (edit)\r\nhttps://github.com/dlang/phobos/pull/4936 Fix Issue 16745 - Add template helper for creating static arrays with the size inferred #4936\r\nhttps://github.com/dlang/phobos/pull/4090 Better static array support in std.array #4090\r\n\r\n## not related\r\nhttps://issues.dlang.org/show_bug.cgi?id=9165 Issue 9165 - Auto conversion from dynamic array to fixed size array at return (edit)\r\n\r\n## TODO\r\n* update the dreadful `mak/*`\r\n* decide whether to put in std.array or core.array\r\n* decide whether both staticArray and asStatic are needed or whether asStatic is sufficient\r\n* probably need to add asStaticCast as well for symmetry (is there a better way to avoid the code dup?)\r\n* should i make rename `staticArrayCast` as `staticArray` so that there's no user-looking difference bw case where an explicit cast is needed vs not."},"comment":{"url":"https://api.github.com/repos/dlang/druntime/issues/comments/365827769","html_url":"https://github.com/dlang/druntime/pull/2093#issuecomment-365827769","issue_url":"https://api.github.com/repos/dlang/druntime/issues/2093","id":365827769,"user":{"login":"timotheecour","id":2194784,"avatar_url":"https://avatars2.githubusercontent.com/u/2194784?v=4","gravatar_id":"","url":"https://api.github.com/users/timotheecour","html_url":"https://github.com/timotheecour","followers_url":"https://api.github.com/users/timotheecour/followers","following_url":"https://api.github.com/users/timotheecour/following{/other_user}","gists_url":"https://api.github.com/users/timotheecour/gists{/gist_id}","starred_url":"https://api.github.com/users/timotheecour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timotheecour/subscriptions","organizations_url":"https://api.github.com/users/timotheecour/orgs","repos_url":"https://api.github.com/users/timotheecour/repos","events_url":"https://api.github.com/users/timotheecour/events{/privacy}","received_events_url":"https://api.github.com/users/timotheecour/received_events","type":"User","site_admin":false},"created_at":"2018-02-15T05:15:39Z","updated_at":"2018-02-15T05:15:39Z","author_association":"NONE","body":"after feedback from reviewers, moved to a new PR under phobos: https://github.com/dlang/phobos/pull/6178"}}
{"actor":{"display_login":"timotheecour"}}