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