Bug 15471 – Show example of associative array initialization in documentation

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-12-23T07:33:32Z
Last change time
2020-03-21T03:56:37Z
Assigned to
Mark Isaacson
Creator
Mark Isaacson

Comments

Comment #0 by markisaa — 2015-12-23T07:33:32Z
We need an example of how to initialize associative arrays in the documentation at http://dlang.org/spec/hash-map.html I look this up fairly frequently and it's just not readily searchable. Eventually I'll try to find time to fix this myself, but, it may be a while.
Comment #1 by b2.temp — 2015-12-23T21:16:18Z
(In reply to Mark Isaacson from comment #0) > We need an example of how to initialize associative arrays in the > documentation at http://dlang.org/spec/hash-map.html > > I look this up fairly frequently and it's just not readily searchable. > Eventually I'll try to find time to fix this myself, but, it may be a while. Since there already a paragraph named "Runtime Initialization of Immutable AAs" I assume you speak about the 'AssocArrayLiteral' construct. Currently there's only a description in the grammar: http://dlang.org/spec/grammar.html#KeyValuePairs
Comment #2 by markisaa — 2015-12-24T00:34:13Z
Yep, we're on the same page. Personally I find it difficult to decipher the grammar. I'm sure that page is a barrier to new users. So yeah, the request would be to get an example of that, a little code block, somewhere on http://dlang.org/spec/hash-map.html
Comment #3 by markisaa — 2016-01-04T03:25:57Z
Comment #4 by github-bugzilla — 2016-01-05T14:22:44Z
Commit pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/6eed593864fc4530539851d7e44138c42f04a7e6 Merge pull request #1180 from markisaa/issue_15471 Issue 15471: Associative Arrays: add example of static initialization
Comment #5 by github-bugzilla — 2016-03-19T20:22:15Z