Bug 23602 – Reimplement associative arrays on runtime

Status
NEW
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2023-01-05T19:38:14Z
Last change time
2024-12-07T13:42:21Z
Assigned to
No Owner
Creator
Marcelo Silva Nascimento Mancini
Moved to GitHub: dmd#17455 →

Comments

Comment #0 by msnmancini — 2023-01-05T19:38:14Z
Current D Runtime Associative Array is pretty buggy. After talking with some, people, its implementation was done even before D having templates, so, it should not be too hard to do it better than how it is now[1]. Right no no one wanted to rework on it, but everyone which tried doing a custom druntime basically dropped support for associative arrays given how confusing is to implement them. I'm working on them for Adam's minimal runtime and I just saw that implementing them would basically be as complex as implementing everything that has been done so far for this minimal wasm runtime. There is some proposals such as mapping Associative Array to a library type rather than doing bunch of hooks, which seems to be a better solution for the long run. [1]: Steve has done a new associative array implementation that maps to the current one, it has roughly 1/3 LoC the current one has and it is a lot easier to understand: https://github.com/schveiguy/newaa/blob/master/source/schlib/newaa.d
Comment #1 by robert.schadek — 2024-12-07T13:42:21Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17455 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB