Associative arrays
Mathias LANG
geod24 at gmail.com
Tue May 18 09:24:02 UTC 2021
On Tuesday, 18 May 2021 at 09:14:46 UTC, Chris Piker wrote:
> This sounds like a reasonable position. Imagine for a second
> that AAs were implemented as a library. What would the library
> equivalent of this:
>
> ```d
> long[string] aa = ["foo": 5, "bar": 10, "baz": 2000 ];
> ```
>
> look like?
https://github.com/dlang/druntime/blob/bf21d1bad623c6988d644117c3c0aa4d4f08b771/src/object.d#L2657-L2660
The [playground](https://run.dlang.io/) will show the call to
`_d_assocarrayliteralTX` if you select ASM.
More information about the Digitalmars-d
mailing list