D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15471 - Show example of associative array initialization in documentation
Summary: Show example of associative array initialization in documentation
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: Mark Isaacson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-23 07:33 UTC by Mark Isaacson
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Mark Isaacson 2015-12-23 07:33:32 UTC
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 basile-z 2015-12-23 21:16:18 UTC
(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 Mark Isaacson 2015-12-24 00:34:13 UTC
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 4 github-bugzilla 2016-01-05 14:22:44 UTC
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 github-bugzilla 2016-03-19 20:22:15 UTC
Commit pushed to stable 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